@andabove/gum-nuxt
v0.1.0
Published
Nuxt module for GUM — CSS injection, Gum component auto-import, optional Google Fonts
Readme
@andabove/gum-nuxt
Zero-config Nuxt module for the GUM design system. Configured for public publication on the npm registry (registry.npmjs.org, @andabove scope). The first publish is still user-gated by the Release workflow.
Install
pnpm add @andabove/gum-nuxtOnce published, consumers need no registry mapping and no token, because the package is public. This module has no 0.0.x releases, so the transitional GitHub Packages note in the root README does not apply to it.
In a monorepo workspace (this repo's apps/realworld):
pnpm add @andabove/gum-nuxt@workspace:*Usage
// nuxt.config.ts
export default defineNuxtConfig({
modules: ["@andabove/gum-nuxt"],
});The module:
- Injects
@andabove/gum-foundation/style.css(tokens + Tailwind v4 theme) - Registers the Tailwind v4 Vite plugin so utility classes resolve
- Auto-imports every Gum component exported by
@andabove/gum-foundation(GumButton,GumMenu, …) - Loads Google Sans Flex and Google Sans Code from Google Fonts by default
Options
export default defineNuxtConfig({
modules: ["@andabove/gum-nuxt"],
gum: {
// Set false to skip the Google Fonts CDN links (self-host instead)
googleFonts: true,
},
});Theme
Toggle light/dark with data-theme on <html>:
document.documentElement.setAttribute("data-theme", "dark");Auto-imported components
The component list is not hand-maintained. src/component-names.ts is generated from packages/ui/src/components by pnpm run generate:components-json (the same run that writes the repo-root components.json), and pnpm run check:component-sync fails CI when it drifts from the @andabove/gum-foundation exports.
Build and publish
pnpm --filter @andabove/gum-nuxt run buildrunsnuxt-module-build build(@nuxt/module-builder) and emitsdist/module.mjs+dist/types.d.mts.- Inside the workspace,
exportsresolves tosrc/module.ts(Nuxt loads TS directly), soapps/realworldand local dev need no build step. - On
pnpm pack/pnpm publish,publishConfig.exportsswaps the entry todist/,prepackrebuilds, and pnpm rewrites theworkspace:*dependencies to concrete versions. - The Release workflow (
.github/workflows/release.yml) publishes this package in lockstep with@andabove/gum-tokensand@andabove/gum-foundation.
Notes
- Components ship from
@andabove/gum-foundation(build that package, or rely on workspacedist). - Iconify is not wired here; Gum icons are SVG assets inside
@andabove/gum-foundation.
License / usage
UNLICENSED. Public publication is user-gated and still waits on the license decision (ABO-302). No rights are granted by default; usage terms are at &above's discretion. Contact &above before using it outside &above projects.
