Skip to content
Showcase theme Default Brutalist Coral Inspired by Airbnb Midnight Inspired by Linear Editorial Inspired by Oura How theming works
Interface sounds: off

Theming ​

Jane Cooper

Acme workspace
Active

Writing a theme ​

Override tokens on :root. Luxen declares its own in @layer theme, so yours win whatever the load order:

css
:root {
  --l-font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif;

  --l-color-bg-fill-brand: light-dark(#0369a1, #38bdf8);
  --l-color-bg-fill-brand-hover: light-dark(#075985, #7dd3fc);
  --l-color-bg-fill-brand-active: light-dark(#0c4a6e, #bae6fd);
  --l-color-text-on-fill-brand: light-dark(#ffffff, #082f49);
  --l-form-control-activated-color: var(--l-color-bg-fill-brand);

  --l-radius-sm: 0.5rem;
  --l-radius-md: 0.75rem;
  --l-radius-lg: 1rem;
}

Write colors with light-dark() to support both color schemes. All tokens are listed on Design Tokens.

Icons ​

The chevrons, check marks and crosses elements draw are tokens too. Point one at your own SVG and every element that draws it follows:

css
:root {
  --l-icon-chevron-down: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 9h12l-6 7z'/></svg>");
}

Only the shape counts: the element paints it in its own color. See Icons for which element draws which token.

In a cascade layer ​

A theme inside @layer base, components or utilities wins too, as long as the layer order theme, base, components is set first. Luxen and Tailwind both declare it; if your CSS loads before them, start it with @layer theme, base, components;.

Token stylesheets ​

luxen-ui/css/preset bundles the pieces below. Import them one by one to swap a layer — your own primitives, say:

css
/* ── luxen-ui/css/preset = base + tokens ─────────────────── */
@import 'luxen-ui/css/base'; /* runtime helpers, FOUC fix — no tokens */
@import 'luxen-ui/css/tokens'; /* primitives + aliases + component tokens */

/* ── Finer grained: luxen-ui/css/tokens = these three ────── */
/* @import 'luxen-ui/css/tokens/primitives'; */ /* 5 color families, spacing, radius, text… */
/* @import 'luxen-ui/css/tokens/aliases'; */ /* semantic aliases only */
/* @import 'luxen-ui/css/tokens/components'; */ /* button, popover, tooltip, form control… */

/* ── Optional ────────────────────────────────────────────── */
/* @import 'luxen-ui/css/tokens/palette'; */ /* 21 more Tailwind color families */

To own every semantic alias, eject them with npx luxen-ui import design-tokens.

Showcase themes ​

Docs-only, not shipped in luxen-ui. To reuse one, replace its :root[data-theme='…'] selector with :root.

Brutalist ​

Square corners, 2px ink borders, hard offset shadows, acid yellow. Space Grotesk.

brutalist.css
css
/* ==============================================
   Brutalist — docs showcase theme
   ==============================================
   Square corners, thick ink borders, hard offset shadows, one loud accent.
   Applied by `data-theme="brutalist"` on <html> (see ThemePicker.vue).

   Section 1 overrides tokens only — every element follows, buttons included
   (their square corners and 2px border come from the radius and form-control
   tokens). Section 2 adds the hard offset shadow and press, which are a
   button look rather than a token. */

:root[data-theme='brutalist'] {
  /* --- 1. Tokens ---------------------------------------------------- */

  --l-font-sans: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --l-font-neo-grotesque: var(--l-font-sans);
  --l-font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --_ink: light-dark(#0a0a0a, #f5f3ea);
  --_paper: light-dark(#fffdf3, #0a0a0a);
  --_acid: #ffe14d;

  --l-color-text-primary: var(--_ink);
  --l-color-text-secondary: light-dark(#2b2b2b, #d6d4cb);
  --l-color-text-tertiary: light-dark(#575757, #a3a19a);
  --l-color-text-neutral: var(--_ink);
  --l-color-text-on-fill-brand: #0a0a0a;

  --l-color-surface: var(--_paper);
  --l-color-surface-overlay: light-dark(#ffffff, #161616);
  --l-color-border: var(--_ink);
  --l-color-border-interactive: var(--_ink);
  --l-color-divider: var(--_ink);

  --l-color-bg-fill-brand: var(--_acid);
  --l-color-bg-fill-brand-hover: #ffd400;
  --l-color-bg-fill-brand-active: #f5c400;
  --l-color-bg-fill-secondary: light-dark(#ffffff, #161616);
  --l-color-bg-fill-neutral-soft: light-dark(#f4f1e4, #1c1c1c);
  --l-color-bg-fill-neutral-subtle: light-dark(#e9e5d3, #2a2a2a);
  --l-color-bg-state-hover: light-dark(#fff3a8, #3a3416);
  --l-color-bg-state-selected: light-dark(#ffe14d, #5c5016);

  /* Zero radius everywhere — except `full`, which keeps radios and avatars
     round so a radio never reads as a checkbox. */
  --l-radius: 0;
  --l-radius-xs: 0;
  --l-radius-sm: 0;
  --l-radius-md: 0;
  --l-radius-lg: 0;
  --l-radius-xl: 0;
  --l-radius-2xl: 0;
  --l-radius-3xl: 0;
  --l-radius-4xl: 0;

  /* Hard offset shadows: no blur, solid ink (acid on dark, where ink is lost). */
  --_shadow-ink: light-dark(#0a0a0a, var(--_acid));
  --l-shadow-sm: 2px 2px 0 0 var(--_shadow-ink);
  --l-shadow-md: 4px 4px 0 0 var(--_shadow-ink);
  --l-shadow-lg: 6px 6px 0 0 var(--_shadow-ink);

  --l-focus-ring-color: light-dark(#2343ff, var(--_acid));
  --l-focus-ring-width: 3px;

  --l-form-control-border-width: 2px;
  --l-form-control-border-color-hover: var(--_ink);
  --l-form-control-activated-color: var(--_ink);
  --l-form-control-activated-content-color: var(--_paper);

  --l-popover-shadow: var(--l-shadow-md);
  --l-tooltip-background-color: var(--_ink);
}

/* --- 2. Element touches ---------------------------------------------- */

/* Every button — primary included — gets an ink edge. */
:root[data-theme='brutalist'] .l-button {
  --border-color: var(--l-color-border);
  --border-color-hover: var(--l-color-border);
}

/* A standalone button casts a hard shadow that it loses when pressed, so a
   click reads as the button sinking. Segments of a joined group overlap their
   neighbours, so the group casts one shadow instead and doesn't move. */
:root[data-theme='brutalist'] .l-button:not(l-button-group > *, .l-radio-group > *) {
  box-shadow: var(--l-shadow-sm);
  transition-property:
    background-color, color, text-decoration, border-color, box-shadow, translate;

  &:not(:disabled):not([aria-disabled='true']):active {
    box-shadow: none;
    translate: 2px 2px;
  }
}

:root[data-theme='brutalist'] :is(l-button-group, .l-radio-group[data-appearance='button']) {
  box-shadow: var(--l-shadow-sm);
}

Coral ​

Inspired by the Airbnb DESIGN.md analysis (not official). Coral accent, soft corners, 48px controls. DM Sans.

coral.css
css
/* ==============================================
   Coral — docs showcase theme, inspired by Airbnb
   ==============================================
   Built from the public Airbnb DESIGN.md analysis on getdesign.md (not an
   official Airbnb design system): white canvas, near-black ink, one coral
   accent, soft rounded shapes, roomy controls.
   Applied by `data-theme="coral"` on <html> (see ThemePicker.vue).

   Deviations from the spec:
   - Airbnb Cereal is proprietary — DM Sans stands in.
   - The spec's accent #ff385c gives white text 3.5:1, below WCAG AA for a
     button label. The fill uses #e31c5f (4.6:1), the deeper end of the same
     coral, and keeps #ff385c for the focus ring.
   - The spec has no dark mode; the dark values are our own. */

:root[data-theme='coral'] {
  /* --- 1. Tokens ---------------------------------------------------- */

  --l-font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --l-font-neo-grotesque: var(--l-font-sans);

  --_ink: light-dark(#222222, #f7f7f7);

  --l-color-text-primary: var(--_ink);
  --l-color-text-secondary: light-dark(#484848, #c4c4c4);
  --l-color-text-tertiary: light-dark(#717171, #8f8f8f);
  --l-color-text-neutral: light-dark(#3f3f3f, #dddddd);
  --l-color-text-on-fill-brand: #ffffff;

  --l-color-surface: light-dark(#ffffff, #121212);
  --l-color-surface-overlay: light-dark(#ffffff, #1e1e1e);
  --l-color-border: light-dark(#c1c1c1, #484848);
  --l-color-border-interactive: light-dark(#dddddd, #3f3f3f);
  --l-color-divider: light-dark(#ebebeb, #2a2a2a);

  --l-color-bg-fill-brand: #e31c5f;
  --l-color-bg-fill-brand-hover: #d70466;
  --l-color-bg-fill-brand-active: #bd0a4f;
  --l-color-bg-fill-secondary: light-dark(#ffffff, #1e1e1e);
  --l-color-bg-fill-neutral-soft: light-dark(#f7f7f7, #1a1a1a);
  --l-color-bg-fill-neutral-subtle: light-dark(#f2f2f2, #2a2a2a);
  --l-color-bg-fill-neutral-strong: var(--_ink);
  --l-color-bg-state-hover: light-dark(#f7f7f7, rgb(255 255 255 / 6%));
  --l-color-bg-state-selected: light-dark(#f2f2f2, rgb(255 255 255 / 10%));

  /* Soft everywhere: 8px controls (buttons and fields follow --l-radius-md),
     14px cards, 20px+ panels. */
  --l-radius: 0.5rem;
  --l-radius-xs: 0.25rem;
  --l-radius-sm: 0.375rem;
  --l-radius-md: 0.5rem;
  --l-radius-lg: 0.875rem;
  --l-radius-xl: 1.25rem;
  --l-radius-2xl: 1.5rem;
  --l-radius-3xl: 2rem;
  --l-radius-4xl: 2rem;

  /* Generous touch targets — Airbnb buttons sit at 48px. */
  --l-size-control-xs: 2rem;
  --l-size-control-sm: 2.5rem;
  --l-size-control-md: 3rem;
  --l-size-control-lg: 3.25rem;
  --l-size-control-xl: 3.5rem;

  /* Layered, very soft card shadows. */
  --l-shadow-sm: 0 0 0 1px rgb(0 0 0 / 2%), 0 2px 4px rgb(0 0 0 / 6%);
  --l-shadow-md: 0 0 0 1px rgb(0 0 0 / 2%), 0 2px 6px rgb(0 0 0 / 4%), 0 4px 8px rgb(0 0 0 / 10%);
  --l-shadow-lg: 0 6px 20px rgb(0 0 0 / 20%);

  --l-focus-ring-color: light-dark(#222222, #ff385c);

  --l-form-control-border-color-hover: var(--_ink);
  --l-form-control-activated-color: var(--_ink);
  --l-form-control-activated-content-color: light-dark(#ffffff, #222222);
  --l-form-control-padding-inline: 0.875rem;

  --l-popover-border-radius: var(--l-radius-lg);
  --l-popover-padding: var(--l-spacing-2);
  --l-menu-item-border-radius: var(--l-radius-md);
  --l-tooltip-background-color: var(--_ink);
}

Midnight ​

Inspired by the Linear DESIGN.md analysis (not official). Near-black canvas, lavender accent, 6–8px corners. Inter.

midnight.css
css
/* ==============================================
   Midnight — docs showcase theme, inspired by Linear
   ==============================================
   Built from the public Linear DESIGN.md analysis on getdesign.md (not an
   official Linear design system): a near-black canvas, cool gray type, one
   lavender accent, crisp 6–8px corners. Dark-first.
   Applied by `data-theme="midnight"` on <html> (see ThemePicker.vue).

   Deviations from the spec:
   - Linear's typefaces are proprietary — Inter stands in (it is what they
     replaced).
   - The spec's hover #828fff gives white text 2.9:1, below WCAG AA. Hover and
     press darken the lavender instead (#5560c8, #4f5bc4).
   - The spec's tertiary ink #62666d reads at 3.6:1 on the canvas; it is
     lifted to #80858d.
   - The spec is dark only; the light values are our own. */

:root[data-theme='midnight'] {
  /* --- 1. Tokens ---------------------------------------------------- */

  --l-font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --l-font-neo-grotesque: var(--l-font-sans);

  --_lavender: #5e6ad2;

  --l-color-text-primary: light-dark(#16171a, #f7f8f8);
  --l-color-text-secondary: light-dark(#4d5058, #8a8f98);
  --l-color-text-tertiary: light-dark(#6b6f76, #80858d);
  --l-color-text-neutral: light-dark(#2c2e33, #d0d6e0);
  --l-color-text-on-fill-brand: #ffffff;

  --l-color-surface: light-dark(#ffffff, #010102);
  --l-color-surface-overlay: light-dark(#ffffff, #141516);
  --l-color-border: light-dark(#d9dadd, #34343a);
  --l-color-border-interactive: light-dark(#e3e4e6, #23252a);
  --l-color-divider: light-dark(#ebebed, #23252a);

  --l-color-bg-fill-brand: var(--_lavender);
  --l-color-bg-fill-brand-hover: #5560c8;
  --l-color-bg-fill-brand-active: #4f5bc4;
  --l-color-bg-fill-secondary: light-dark(#ffffff, #0f1011);
  --l-color-bg-fill-neutral-soft: light-dark(#f7f8f8, #0f1011);
  --l-color-bg-fill-neutral-subtle: light-dark(#eff0f1, #18191a);
  --l-color-bg-fill-neutral-strong: light-dark(#16171a, #f7f8f8);
  --l-color-bg-state-hover: light-dark(rgb(0 0 0 / 4%), rgb(255 255 255 / 5%));
  --l-color-bg-state-selected: light-dark(rgb(94 106 210 / 10%), rgb(94 106 210 / 18%));

  --l-radius: 0.375rem;
  --l-radius-xs: 0.25rem;
  --l-radius-sm: 0.375rem;
  --l-radius-md: 0.5rem;
  --l-radius-lg: 0.75rem;
  --l-radius-xl: 1rem;
  --l-radius-2xl: 1.5rem;

  /* Buttons a notch tighter than the 8px fields, as in the spec. */
  --l-button-border-radius: var(--l-radius-sm);

  /* Dark surfaces lift with a faint top hairline rather than a heavy drop. */
  --l-shadow-sm: 0 1px 2px light-dark(rgb(0 0 0 / 6%), rgb(0 0 0 / 60%));
  --l-shadow-md:
    0 0 0 1px light-dark(rgb(0 0 0 / 4%), rgb(255 255 255 / 4%)),
    0 4px 12px light-dark(rgb(0 0 0 / 8%), rgb(0 0 0 / 60%));
  --l-shadow-lg:
    0 0 0 1px light-dark(rgb(0 0 0 / 4%), rgb(255 255 255 / 5%)),
    0 12px 32px light-dark(rgb(0 0 0 / 12%), rgb(0 0 0 / 70%));

  --l-focus-ring-color: var(--_lavender);

  --l-form-control-background-color: light-dark(#ffffff, #0f1011);
  --l-form-control-border-color-hover: light-dark(#b9bbc0, #3e3e44);
  --l-form-control-activated-color: var(--_lavender);
  --l-form-control-activated-content-color: #ffffff;

  --l-tooltip-background-color: light-dark(#16171a, #23252a);
}

Editorial ​

Inspired by the Oura DESIGN.md analysis (not official). Cream paper, pill buttons, action blue. Instrument Serif headings over Instrument Sans.

editorial.css
css
/* ==============================================
   Editorial — docs showcase theme, inspired by Oura
   ==============================================
   Built from the public Oura DESIGN.md analysis on getdesign.md (not an
   official Oura design system): warm cream paper, a stone-and-earth palette,
   a high-contrast serif for headings over a quiet grotesque, pill buttons,
   and a single action blue reserved for the primary call to action.
   Applied by `data-theme="editorial"` on <html> (see ThemePicker.vue).

   Deviations from the spec:
   - Editorial New and Akkurat are proprietary — Instrument Serif and
     Instrument Sans stand in.
   - The spec's muted ink #838280 reads at 3.4:1 on the cream canvas; tertiary
     text uses #6e6c69 (4.7:1).
   - The spec's text inputs are filled stone with white text; they stay light
     here so every form element keeps one reading.
   - The spec has no dark mode; the dark values are our own. */

:root[data-theme='editorial'] {
  /* --- 1. Tokens ---------------------------------------------------- */

  --l-font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --l-font-serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --l-font-neo-grotesque: var(--l-font-sans);

  --_ink: light-dark(#1c1b1a, #f7f1e8);
  --_stone: light-dark(#4a4741, #cfc8bc);
  --_action: #2a72de;

  --l-color-text-primary: var(--_ink);
  --l-color-text-secondary: var(--_stone);
  --l-color-text-tertiary: light-dark(#6e6c69, #a8a5a0);
  --l-color-text-neutral: var(--_stone);
  --l-color-text-on-fill-brand: #ffffff;

  --l-color-surface: light-dark(#f7f1e8, #1c1a17);
  --l-color-surface-overlay: light-dark(#ffffff, #26231f);
  --l-color-border: light-dark(#cccac7, #4a4741);
  --l-color-border-interactive: light-dark(#e1dcd3, #3a3631);
  --l-color-divider: light-dark(#e1dcd3, #34302b);

  --l-color-bg-fill-brand: var(--_action);
  --l-color-bg-fill-brand-hover: #2566c8;
  --l-color-bg-fill-brand-active: #1f58ad;
  --l-color-bg-fill-secondary: light-dark(#f7f1e8, #1c1a17);
  --l-color-bg-fill-neutral-soft: light-dark(#f1eadf, #24211d);
  --l-color-bg-fill-neutral-subtle: light-dark(#e9e0d2, #2f2b26);
  --l-color-bg-fill-neutral-strong: var(--_stone);
  --l-color-bg-state-hover: light-dark(rgb(74 71 65 / 6%), rgb(247 241 232 / 6%));
  --l-color-bg-state-selected: light-dark(rgb(74 71 65 / 10%), rgb(247 241 232 / 10%));

  /* Soft cards and fields, pill buttons. */
  --l-radius: 0.5rem;
  --l-radius-xs: 0.25rem;
  --l-radius-sm: 0.5rem;
  --l-radius-md: 0.75rem;
  --l-radius-lg: 1.5rem;
  --l-radius-xl: 2.5rem;
  --l-button-border-radius: var(--l-radius-full);

  /* Paper doesn't cast hard shadows: warm, diffuse, barely there. */
  --l-shadow-sm: 0 1px 2px light-dark(rgb(57 34 30 / 6%), rgb(0 0 0 / 40%));
  --l-shadow-md: 0 6px 20px light-dark(rgb(57 34 30 / 8%), rgb(0 0 0 / 45%));
  --l-shadow-lg: 0 16px 40px light-dark(rgb(57 34 30 / 12%), rgb(0 0 0 / 55%));

  --l-focus-ring-color: var(--_action);

  --l-form-control-background-color: light-dark(#ffffff, #26231f);
  --l-form-control-border-color-hover: var(--_stone);
  --l-form-control-activated-color: var(--_stone);
  --l-form-control-activated-content-color: light-dark(#ffffff, #1c1a17);

  --l-popover-border-radius: var(--l-radius-lg);
  --l-popover-padding: var(--l-spacing-2);
  --l-menu-item-border-radius: var(--l-radius-md);
  --l-tooltip-background-color: var(--_stone);
}

/* --- 2. Element touches ---------------------------------------------- */

/* The default button takes the spec's stone outline instead of the neutral
   border. */
:root[data-theme='editorial'] .l-button:not([data-variant]) {
  --border-color: var(--l-color-text-secondary);
  --border-color-hover: var(--l-color-text-primary);
}

/* The serif carries the theme: headings in previews, and the display text
   marked `data-display`, switch to it. */
:root[data-theme='editorial'] .vp-raw :is(h1, h2, h3, h4, [data-display]) {
  font-family: var(--l-font-serif);
  font-size: 1.375em;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}