Content and look
Theme
The kit's look is Nuxt UI, adjusted in
layers/kit/app/app.config.ts(Licensees only) and a few
tokens in
layers/kit/app/assets/css/main.css(Licensees only).
The dashboard is built from a handful of kit components on top of it. You work
here when you change the brand colour or font, or build a dashboard page that
should match the kit's.
How it works
ui.colors in the kit's app.config.ts picks the Nuxt UI palettes, and your
own app/app.config.ts is merged over it, key by key. Every override below
it is written in Nuxt UI's tokens (bg-elevated, bg-inverted/5,
--ui-border) rather than fixed shades, so changing a palette re-tints
everything. An array of yours, such as a compoundVariants list, goes ahead of
the kit's rather than replacing it, and where an entry of yours styles a colour
and variant the kit also styles, the kit's classes win a clash. Mark the classes
that must win as important, such as dark:bg-transparent!.
Surfaces get lighter as they come towards the reader, in both themes:
| Surface | Light | Dark |
|---|---|---|
| Dashboard ground | bg-accented | bg-default |
| Dashboard panel | bg-elevated | bg-elevated/25 |
| Card | bg-muted | bg-elevated/50 |
| Modal, slideover, drawer | bg-muted | bg-elevated |
| Input | bg-default (white) | bg-inverted/5 |
| Menu, popover, tooltip, toast | bg-default + ring | neutral-800 mixed 70% with neutral-700 |
The rest of app.config.ts follows from that table. Dark inputs, outline
buttons and highlighted menu rows use a white wash (bg-inverted/5 or /10),
so they sit a step above whatever holds them. Rules inside cards, modals,
slideovers and drawers redefine --ui-border as white at 10% in the dark
theme, where the default border colour matches the surface. Overlays dim with
bg-black/60. Buttons default to color: 'neutral' and size: 'lg', and
disabled controls sit at 50% opacity.
Change the brand colour
In your app/app.config.ts:
export default defineAppConfig({
ui: {
colors: {
primary: 'indigo',
neutral: 'slate',
},
},
})
The kit ships primary: 'zinc' and neutral: 'neutral'. Nuxt UI paints active
links, focus rings and anything given color="primary" in the primary palette.
Solid buttons default to neutral, black on light and white on dark, so give
color="primary" to a button that should carry the brand.
A light primary such as orange or amber needs dark text on its solid fills.
Add it per component under ui:
button: {
compoundVariants: [
{ color: 'primary', variant: 'solid', class: 'text-neutral-900' },
],
},
badge: {
compoundVariants: [
{ color: 'primary', variant: 'solid', class: 'text-neutral-900' },
],
},
Change the font
The family is --font-sans in the kit's main.css.
layers/kit/nuxt.config.ts loads that file by path, so a file of yours at
app/assets/css/main.css does not replace it. Redefine the token in a
stylesheet of your own instead. Write it outside @theme and any @layer: the
kit's value sits in Tailwind's theme layer, and a plain rule outranks it
wherever it loads.
:root {
--font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
}
List that file in your nuxt.config.ts:
export default defineNuxtConfig({
css: ['~/assets/css/theme.css'],
})
@nuxt/fonts reads that name, then downloads and self-hosts the family. The Open
Graph image has its own copy: ogImage.defaults.fonts in your nuxt.config.ts
adds fonts to the kit's ['Inter:400', 'Inter:500', 'Inter:600'], and the
font-family is in
layers/kit/app/components/OgImage/Default.takumi.vue(Licensees only),
which a copy at app/components/OgImage/Default.takumi.vue replaces. The
heading letter-spacing in the kit's main.css is tuned for Inter, so check it
against the new face.
Build a dashboard section
DashboardSection(Licensees only) is the
card every dashboard page is made of. The heading sits inside the card, with the
action at its end. SettingRow(Licensees only)
puts one setting's label and help on the left and its control on the right:
<template>
<DashboardSection
:title="$t('reports.title')"
:description="$t('reports.description')"
>
<template #actions>
<UButton :label="$t('reports.export')" @click="exportReports" />
</template>
<SettingRow
:label="$t('reports.weekly.label')"
:help="$t('reports.weekly.help')"
>
<USwitch v-model="weekly" :aria-label="$t('reports.weekly.label')" />
</SettingRow>
</DashboardSection>
</template>
| Prop | What it does |
|---|---|
title, description | The heading. With neither, and no #heading, #actions or #toolbar, no header is drawn |
fill | Caps the card at the panel's height and scrolls its body. Only for a page that is one list |
bleed | Removes the body's padding, so a table runs edge to edge |
tone="danger" | A red tint and border for actions that can't be undone |
The slots are #heading (replaces title and description), #meta (beside the
title, such as a count badge), #actions, #toolbar, #footer and the
default body.
- Put the section's action in
#actions, a form's Save included. Call the form'ssubmit()from there rather than posting the state yourself, so the schema still runs. - Pass
#footeronly when there is something in it. A passed slot draws the footer even when it renders nothing. - A page draws no wrapper of its own. The shell already stacks sections with a
gap and caps them at
lg:max-w-3xl. - The body is a container, and
SettingRowgoes two-column at@2xl, so rows respond to the card's width when the notifications drawer narrows the panel. - A destructive action on a list row is
color="error" variant="ghost". An empty state inside a card isUEmptywithvariant="naked".
Build a page that is one list
Give the section fill and bleed, put the filters in #toolbar, and page
with DashboardPager(Licensees only) in the
footer. This is the shape of
layers/kit/app/pages/dashboard/customers.vue(Licensees only):
<template>
<DashboardSection
fill
bleed
:title="$t('reports.title')"
:description="$t('reports.description')"
>
<template #toolbar>
<UInput v-model="search" type="search" icon="i-lucide-search" />
</template>
<SkeletonTable v-if="isPending" :rows="perPage" :columns="columns.length" />
<UTable
v-else
class="min-h-0 flex-1"
:data="data?.rows ?? []"
:columns="columns"
:loading="asyncStatus === 'loading'"
:ui="{ root: 'scroll-fade-y' }"
/>
<template v-if="data && data.total > data.perPage" #footer>
<DashboardPager
v-model:page="page"
:total="data.total"
:per-page="data.perPage"
/>
</template>
</DashboardSection>
</template>
Inside the settings or organization shell, the page also declares
definePageMeta({ fill: true }), so the shell gives it a bounded height to
fill. The toolbar is a container too: lay filters out with @2xl: or @4xl:
variants, not viewport breakpoints.
scroll-fade-y fades a scroller's top or bottom edge only while there is more
to scroll that way. The dashboard panel's body and a fill card's body already
carry it. In a fill card the table is what scrolls, so the table's root takes
the class.
Show a placeholder while loading
Use the skeleton components, sized like what they stand in for:
| Component | Stands in for | Props |
|---|---|---|
SkeletonCard | A DashboardSection with rows | rows (2), action |
SkeletonRows | List rows, with an icon or switch before and a control after | rows (3), leading, trailing, lines |
SkeletonForm | Form fields | fields (2), hint |
SkeletonTable | The first page of a UTable | rows (5), columns (4) |
Later pages keep their rows and dim them through UTable's loading. A single
USkeleton of your own either stands in for one control, with role="status"
and :aria-label="$t('common.loading')", or carries aria-hidden="true" inside
a labelled wrapper.
layers/kit/test/unit/skeleton-labels.test.ts(Licensees only)
holds every USkeleton in layers/kit/app/ to that rule. It reads none of your
files.
Add a chart
DashboardActivityCard(Licensees only)
wraps the unovis stacked bar chart with its legend, an accessible table, and the
loading, empty and failed states. Give each series the next --color-chart-<n>
slot, in order:
const series = computed<DashboardChartSeries[]>(() =>
['signIns', 'failedSignIns', 'sessions'].map((id, index) => ({
id,
label: t(`reports.series.${id}`),
color: `var(--color-chart-${index + 1})`,
})),
)
The eight slots in the kit's main.css are ordered so neighbours stay
distinguishable with colour blindness, in both themes. Keep a series on its slot
when a range leaves another series empty. The first three are distinct in any
arrangement; past three, fold the tail into one series or rely on the legend and
table.
The chart renders only in the browser (DashboardStackedBarChart.client.vue),
so unovis never enters the Worker bundle. The card renders it as
<LazyDashboardStackedBarChart> inside an h-60 box, the 240 pixels the chart
draws at, so the browser fetches unovis and d3 only when a chart is first drawn
and nothing below the card moves while they arrive. Do the same in a card of
your own: the bare <DashboardStackedBarChart> puts the library in the chunk of
every page that renders the card. The chart's segment gaps are stroked in
--color-chart-surface, the card's colour, so change that token with the
card's background.
DashboardStatCard takes better: 'higher' | 'lower' | 'neither' to colour
its trend. Pass lower for a count that should fall, such as failed sign-ins,
and neither for one that is only activity.
Use an icon
Write the icon's whole name where you use it, such as icon="i-lucide-rocket",
in a .vue, .ts, Markdown, YAML or JSON file. The build reads those files for
icon names and puts every icon it finds in the client bundle. A production page
draws its icons from JavaScript it has already loaded and never fetches one.
The kit installs @iconify-json/lucide and @iconify-json/fa6-brands. An icon
from any other collection needs its @iconify-json/<collection> package
first.
The build can't see a name your code puts together while it runs, so that icon comes out blank in production. Write every name it can produce in full, in a map:
const STATUS_ICONS = {
active: 'i-lucide-circle-check',
paused: 'i-lucide-circle-pause',
cancelled: 'i-lucide-circle-x',
}
layers/kit/test/nuxt/icon-client-bundle.test.ts(Licensees only)
draws every icon the kit's source files in layers/kit/ name from the bundle
alone. When one comes out blank, it fails and names the icon and the file. The
usual causes are a misspelt or renamed icon, a collection that isn't installed,
or a file type the build doesn't read. It also fails on a name assembled in
code. It reads none of your files, so check an icon of yours under pnpm preview, which runs the production build.
pnpm dev doesn't show these failures. It serves icons from the Worker, so an
icon you add while it runs appears without a restart, but one the production
build would miss shows there too.
Configuration
| Key | Where | Default | What it does |
|---|---|---|---|
ui.colors.primary | app/app.config.ts | 'zinc' | Brand palette |
ui.colors.neutral | app/app.config.ts | 'neutral' | Greys every surface and override is built from |
ui.button.defaultVariants | app/app.config.ts | color: 'neutral', size: 'lg' | What a bare UButton looks like |
toaster | app/app.config.ts | bottom right, 3 at most, collapsed, no progress bar | Passed to UApp |
forms.validateOn | app/app.config.ts | input and change on, blur and focus off | Which events make a UForm check a field |
--font-sans | layers/kit/app/assets/css/main.css | 'Inter' | The app's typeface |
--color-chart-1 to --color-chart-8 | layers/kit/app/assets/css/main.css | blue, orange, aqua, yellow, magenta, green, violet, red | Chart series colours, separate values per theme |
--color-chart-surface | layers/kit/app/assets/css/main.css | the card's colour | Gap between stacked segments |
ogImage.defaults.fonts | nuxt.config.ts | Inter 400, 500, 600 | Fonts the Open Graph renderer loads |
icon.provider | nuxt.config.ts | 'none', and 'server' under pnpm dev | Where an icon outside the client bundle comes from |
icon.clientBundle.scan.globInclude | nuxt.config.ts | Vue, TypeScript, JavaScript, Markdown, YAML, JSON | Files the build reads for icon names |
Good to know
forms.validateOnis one switch per event, merged key by key:{ blur: true, input: false, change: false }checks a field when it loses focus. An array there failspnpm typecheck.- Card variants in Nuxt UI's theme are keyed by slot. Give an override an
object such as
{ root: '…' }. A plain string replaces the variant, and the card loses its ring and the rules between header, body and footer. - The production build's CSS minifier rewrites an
animationshorthand with a0sduration, which breaks scroll-driven animations. Write them in longhands, asscroll-fade-ydoes, and check the built CSS:pnpm devdoesn't minify. - A mask hides everything outside an element's border box, the focus outline
included. Put
scroll-fade-yon a specific scroller, never on every table. - The dashboard darkens
text-mutedin the light theme so it keeps 4.5:1 contrast on the grey grounds. Menus, modals and toasts are teleported outside the dashboard and keep Nuxt UI's value. - The Open Graph renderer, Takumi, has no
radial-gradient. The default template draws its glow as a blurred white disc instead.
A link with a lock opens the kit’s private repository, which every licensee can read.