Foundations

Appearance and customizer

Dark mode, primary colours, menu style, layouts, content width, density and right-to-left.

stores/preferences.ts

The customizer (the palette icon in the navbar) lets every user adjust the app. Their choices are stored in cookies, so the server renders the right version on the first request.

The options

Option
Values
Default
Themelight, dark, systemsystem
primaryAny id in PRIMARY_PRESETSmelsami
menulight, semi-darklight
layoutvertical, horizontal, collapsedvertical
contentWidthboxed, fullboxed
directionltr, rtlltr
densitycomfortable, compactcomfortable

The theme is stored in the app-theme cookie and the rest in app-appearance. normalizeAppearance() validates the cookie, so an old or edited value falls back to the defaults.

Change the defaults

Edit DEFAULT_APPEARANCE in config/appearance.config.ts:

config/appearance.config.ts
export const DEFAULT_APPEARANCE: AppearancePreferences = {
  primary: DEFAULT_PRIMARY_PRESET,
  menu: 'semi-dark',
  layout: 'horizontal',
  contentWidth: 'boxed',
  direction: 'ltr',
  density: 'comfortable',
}

To remove an option for everybody, set the default and remove its section from AppCustomizer.

Turn shell features off

APP_FEATURES in config/features.config.ts switches off whole pieces of the shell, everywhere they appear:

config/features.config.ts
export const APP_FEATURES: AppFeatures = {
  customizer: false,
  commandPalette: true,
  themeToggle: true,
  languageSwitcher: true,
  notifications: false,
  shortcutsDialog: true,
}
Key
What it removes
customizerThe customizer drawer and its buttons in the app bar and the user menu. Visitors keep the defaults above.
commandPaletteThe palette, its Ctrl/⌘ K shortcut, the search trigger in the app bar and the search button of the 404 page.
themeToggleThe light/dark/system button in the app, the landing, the auth and the status pages.
languageSwitcherThe language menu everywhere. It also hides on its own when only one language is configured.
notificationsThe notifications menu in the app bar.
shortcutsDialogThe keyboard shortcuts sheet opened with ?.

Read and change preferences

ts
const preferences = usePreferencesStore()

preferences.isDark
preferences.appearance.layout
preferences.setThemeMode('dark')
preferences.setAppearance('density', 'compact')
preferences.resetAppearance()

useThemeControl() wraps the theme toggle (icon, label and action) used by AppThemeToggle.

How it is applied

useAppearance() runs once in app.vue. It:

  • switches the Vuetify theme when the theme changes;
  • writes the chosen preset into the light, dark and sidebar themes (primary, secondary, tertiary, accent, plus nav-active and the first two chart colours);
  • sets Vuetify's rtl and the dir attribute of <html>.

Dark mode without a flash

The system theme is resolved after onNuxtReady. Resolving prefers-color-scheme during hydration would make the browser render a different theme than the server, and the mismatch can leave animated elements invisible. A small inline script in nuxt.config.ts swaps the theme class before the first paint when the server guessed wrong, and saves the result in the app-theme-resolved cookie for the next request.

Layouts

  • Vertical: the sidebar is a permanent drawer.
  • Collapsed: the sidebar starts in rail mode and expands on hover.
  • Horizontal: AppHorizontalNav renders the menu as dropdowns in the app bar, one per section, and the sidebar becomes temporary.

Right-to-left

With direction: 'rtl' the whole layout mirrors. For your own code:

  • Use logical spacing classes: ms-*, me-*, ps-*, pe-* instead of ml-*, mr-*.
  • Use logical CSS: inset-inline-start, margin-inline-end, border-inline-start.
  • Choose direction-aware icons from useRtl().isRtl when an arrow must point forward.
© 2026 melsami UI.
Developer documentation for melsami UI.