Pavo is OneLiteFeather's Material 3 library for Nuxt 4 and Vue 3. It ships the design tokens (colour roles from one
seed, Tailwind v4 theme), a set of components prefixed M3 (M3Button, M3AppFrame, ...), composables for theme,
snackbar and media queries, and German and English built-in texts.
Pavo is published as @onelitefeathernet/pavo on GitHub Packages.
Pavo is public, but GitHub Packages requires a token with read:packages even to download it. Add an .npmrc to the
project:
@onelitefeathernet:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}Then install the package:
pnpm add @onelitefeathernet/pavo tailwindcss @tailwindcss/viteRegister the module in nuxt.config.ts. Tailwind is wired through @tailwindcss/vite:
export default defineNuxtConfig({
modules: ['@onelitefeathernet/pavo'],
css: ['~/assets/css/main.css'],
vite: { plugins: [tailwindcss()] },
})The module registers the M3 components and the composables with auto-imports. With fonts: true (the default)
it adds the Roboto weights 400, 500 and 700 to the app styles.
app/assets/css/main.css must import Tailwind first and Pavo second, so Pavo's base layer and utilities come after
Tailwind's:
@import "tailwindcss";
@import "@onelitefeathernet/pavo/css";The default seed is OLF blue #114cc8. For another brand colour, generate the tokens once and import the theme
instead of /css:
pnpm exec pavo-tokens --seed '#ff6600' --out app/assets/css/pavo-tokens.css@import "tailwindcss";
@import "@onelitefeathernet/pavo/css/theme";
@import "./pavo-tokens.css";Outside Nuxt, import from the plain-Vue entry. It only depends on vue and needs no #imports:
import { useColorTheme, useSnackbar } from '@onelitefeathernet/pavo/vue'Import the CSS the same way as above (@onelitefeathernet/pavo/css). Your bundler must handle .vue files from the
package, because the entry re-exports the components as single-file components.
Code that only needs the RFC 9457 error helpers (for example an API client or its tests) can import them without the components:
import { toClientError } from '@onelitefeathernet/pavo/problem'pnpm install
pnpm dev:prepare # stubs the module and generates the playground types
pnpm dev # playground on http://localhost:3000
pnpm tokens # regenerates src/runtime/css/tokens.css after changing the generator
pnpm test- GitHub Actions: a job that installs a Pavo release needs
permissions: packages: readand theGITHUB_TOKENpassed asNODE_AUTH_TOKEN, withregistry-url: https://npm.pkg.github.comandscope: '@onelitefeathernet'onactions/setup-node. - Docker: do not copy the token into an image layer. Pass the
.npmrcas a BuildKit secret:
# syntax=docker/dockerfile:1
RUN --mount=type=secret,id=npmrc,target=/app/.npmrc pnpm install --frozen-lockfiledocker build --secret id=npmrc,src=$HOME/.npmrc -t my-app .Releases are cut by release-please from Conventional Commits on main. A merged release is published to GitHub
Packages by the publish job of .github/workflows/release-please.yml.
Apache-2.0