Theme

Component theme defaults and color mode configuration for Nuxt UI. Defines per-component defaultVariants, slot overrides, and light/dark color mode shade mappings for the Ontopix design system.

Production

The theme system provides a single source of truth for all Nuxt UI component defaults. Values flow through the stylebook build pipeline into app.config.ts (component defaults) and ontopix.css (color mode overrides).

Package

The theme is distributed as part of the @ontopix/nuxt-layer-ui package. This Nuxt layer provides:

  • nuxt.config.ts — Global color and size defaults via ui.theme.defaultVariants (build-time)
  • app.config.ts — Per-component slots and defaultVariants overrides (runtime)
  • ontopix.css — Color mode CSS variable overrides for light/dark themes

When you install @ontopix/nuxt-layer-ui as a Nuxt layer, these files are automatically merged into your application — no manual copying required.

How It Works

Theme data is authored in brand/theme/*.yaml and flows through the stylebook build pipeline:

brand/theme/*.yaml  →  brand.json  →  Jinja2 templates  →  @ontopix/nuxt-layer-ui

The Nuxt UI theming system has two complementary configuration layers:

LayerFileScopeWhen
Global defaultsnuxt.config.tscolor and size for all componentsBuild-time (module option)
Component overridesapp.config.tsAny variant, per componentRuntime (app config merge)
Color modesontopix.cssCSS variables for light/darkRuntime (CSS cascade)

For installation and customization details, see Installation & Customization.

Global Defaults

The build-time baseline applied to all Nuxt UI components:

PropertyValue
colorneutral
sizemd

Component Defaults

Per-component overrides configured at runtime. Each component can define slots (Tailwind CSS class defaults), variants and compoundVariants (variant-specific overrides), and defaultVariants (variant prop defaults). Only actual overrides are listed — components not shown here use NuxtUI defaults.

Components with Custom Variants

ComponentDefault Variants
alertvariant=subtle
bannercolor=prominent
chipcolor=prominent, size=xl
contentTochighlightColor=navigation

Slot-Based Components

14 components have Tailwind CSS slot class definitions providing a baseline for customization.

Icons

Custom Icon Collection

The layer registers a custom Iconify collection named ontopix via icon.customCollections in nuxt.config.ts. This makes brand SVGs available as standard icons throughout any consuming Nuxt app.

Icon NameUsageDescription
i-ontopix-spinnerLoading indicatorsOntopix target ring — animated for loading states
i-ontopix-logoBrand markOntopix logo (target + arrow)

These icons use currentColor fill, so they inherit the parent element's text color like any other Iconify icon.

Icon Overrides

The theme overrides Nuxt UI's default icon set. Icons using the i-ontopix-* prefix come from the custom collection above.

KeyIcon
arrowDowni-lucide-arrow-down
arrowLefti-lucide-arrow-left
arrowRighti-lucide-arrow-right
arrowUpi-lucide-arrow-up
cautioni-lucide-circle-alert
checki-lucide-check
chevronDoubleLefti-lucide-chevrons-left
chevronDoubleRighti-lucide-chevrons-right
chevronDowni-lucide-chevron-down
chevronLefti-lucide-chevron-left
chevronRighti-lucide-chevron-right
chevronUpi-lucide-chevron-up
closei-lucide-x
copyi-lucide-copy
copyChecki-lucide-copy-check
darki-lucide-moon
dragi-lucide-grip-vertical
ellipsisi-lucide-ellipsis
errori-lucide-circle-x
externali-lucide-arrow-up-right
eyei-lucide-eye
eyeOffi-lucide-eye-off
filei-lucide-file
folderi-lucide-folder
folderOpeni-lucide-folder-open
hashi-lucide-hash
infoi-lucide-info
lighti-lucide-sun
loadingi-ontopix-spinner
menui-lucide-menu
minusi-lucide-minus
ontopixi-ontopix-logo
panelClosei-lucide-panel-left-close
panelOpeni-lucide-panel-left-open
plusi-lucide-plus
reloadi-lucide-rotate-ccw
searchi-lucide-search
stopi-lucide-square
successi-lucide-circle-check
systemi-lucide-monitor
tipi-lucide-lightbulb
uploadi-lucide-upload
warningi-lucide-triangle-alert

Color Modes

Color mode overrides are rendered as CSS custom properties in :root (light) and .dark scopes.

Semantic Colors

ColorLight ShadeDark Shade
brand600400
error600400
info600400
navigation600400
neutral600400
paper400400
phase-active600400
phase-archived500500
phase-done600400
phase-expired600400
phase-failed600400
phase-idle600400
phase-queued600400
phase-retry600400
polarity-mixed600400
polarity-negative600400
polarity-neutral500400
polarity-positive600400
primary600400
prominent600400
quality-bad600400
quality-excellent600400
quality-good600400
quality-insufficient600400
quality-none500500
quality-perfect600400
quality-regular600400
secondary600400
space800600
success600400
warning600400

UI Tokens

TokenLightDark
--ui-bgpaper-100space-900
--ui-bg-accentedpaper-400space-600
--ui-bg-asidepaper-200space-950
--ui-bg-elevatedpaper-300space-700
--ui-bg-invertedpaper-900space-100
--ui-bg-mutedpaper-200space-800
--ui-borderpaper-300space-700
--ui-border-accentedpaper-400space-600
--ui-border-invertedpaper-800space-200
--ui-border-mutedpaper-300space-700
--ui-textpaper-800space-200
--ui-text-dimmedpaper-400space-600
--ui-text-highlightedpaper-950space-50
--ui-text-invertedpaper-100space-900
--ui-text-mutedpaper-500space-500
--ui-text-tonedpaper-600space-400

Global Tokens

TokenLightDark
--ui-radius

Component Showroom

Browse the Ontopix theme applied to Nuxt UI components across different categories:

Surfaces

Background, text, and border tokens — the visual layering system

Elements

Buttons, badges, alerts, cards, avatars, and more

Form

Inputs, selects, checkboxes, switches, and form fields

Data

Tables, accordions, carousels, timelines, and trees

Navigation

Menus, tabs, breadcrumbs, pagination, and steppers

Page

Heroes, page cards, CTAs, pricing plans, and blog posts