@vitral/nuxt
The Nuxt module for Vitral: the plugin from nuxt.config, auto-imported components and composables, the theme rendered on the server and the colour scheme in a cookie.
2,999
3
| Install | |
|---|---|
npm install @vitral/nuxt |
|
| Latest Version: | 0.2.16 |
| Vue: | 3 |
| License: | LGPL-3.0-or-later |
| Last Updated: | Oct 3, 2026 |
| Links: | GitHub · npm |
Maintainer: stoshe
@vitral/nuxt
The Nuxt module for Vitral.
pnpm add @vitral/nuxt @vitral/vue
export default defineNuxtConfig({
modules: ['@vitral/nuxt'],
vitral: { preset: 'Prism', colorScheme: 'system' }
});
That is the whole setup. <VtButton>, <VtInputText>, useTheme() and the
rest are auto-imported, the stylesheets go into the head of the page the server
sends, and the colour scheme is kept in a cookie so the server renders the one
the reader picked instead of flashing the wrong one.
| Option | What it does |
|---|---|
preset |
A shipped preset by name ('Prism', 'Ink', 'Avalonia', 'Simple', 'Astra'), a module that default-exports one, or false |
colorScheme |
'light', 'dark' or 'system' |
cookie |
Where the reader's choice is kept, so the server can read it. false forgets it |
darkModeSelector |
Where the dark scheme applies: a class, an attribute, 'system' or false |
locale |
'en', 'ptBR', or a module that default-exports a locale |
prefix |
The prefix on registered components. 'Vt' by default, '' for <Button> |
components, composables |
Register them globally. Off means importing by hand |
cssLayer, inputVariant, unstyled |
The same options the Vue plugin takes |
Directives keep their plain names (v-tooltip, v-scrollbar), because they are
registered on the application rather than auto-imported.
LGPL-3.0-or-later. Part of the Vitral monorepo.
Related Packages
nuxt-hydration-gate
Mark Nuxt app hydration with a DOM attribute for CSS, scripts, and end-to-end te...
211
0
@verbaly/nuxt
Nuxt integration for Verbaly: zero-config module with per-request locale negotia...
8,706
4
@trevor-okwirri/nuxt-query
TanStack Query for Nuxt with SSR hydration and auto-imported composables
686
0
Version History
| Version | Released | License |
|---|---|---|
| 0.2.16 | LGPL-3.0-or-later | |
| 0.2.15 | LGPL-3.0-or-later | |
| 0.2.14 | LGPL-3.0-or-later | |
| 0.2.13 | LGPL-3.0-or-later | |
| 0.2.12 | LGPL-3.0-or-later | |
| 0.2.11 | LGPL-3.0-or-later | |
| 0.2.10 | LGPL-3.0-or-later | |
| 0.2.9 | LGPL-3.0-or-later | |
| 0.2.8 | LGPL-3.0-or-later | |
| 0.2.7 | LGPL-3.0-or-later | |
| 0.2.6 | LGPL-3.0-or-later | |
| 0.2.5 | LGPL-3.0-or-later | |
| 0.2.4 | LGPL-3.0-or-later | |
| 0.2.3 | LGPL-3.0-or-later | |
| 0.2.2 | LGPL-3.0-or-later | |
| 0.2.1 | LGPL-3.0-or-later | |
| 0.2.0 | LGPL-3.0-or-later | |
| 0.1.0 | LGPL-3.0-or-later |