Getting started
Tokens
Every color, size and style in Lunia DS is a design token. The Figma variables are the source, and the CSS below is generated from them.
Use the tokens
Each token is a CSS variable with the prefix --lunia-. Tailwind classes use the same names.
- CSS:
color: var(--lunia-text-primary); - Tailwind:
text-primary,bg-secondary,border-control,rounded-xl,shadow-md - Dark mode: add the
darkclass ordata-theme="dark"to the page or to any part of it. The same variable then gives the dark value.
In split chips, the left half is light mode and the right half is dark mode.
Text colors
Colors for text. Pick by role: primary for headings, secondary and tertiary for body and help text.
| Token | Light | Dark |
|---|---|---|
text-primary --lunia-text-primary Primary text such as page headings. | #171717 neutral-900 | #fafafa neutral-50 |
text-primary_on-brand --lunia-text-primary_on-brand Primary text on solid brand backgrounds, such as CTA sections. | #ffffff base-white | #fafafa neutral-50 |
text-secondary --lunia-text-secondary Secondary text such as labels and section headings. | #404040 neutral-700 | #d4d4d4 neutral-300 |
text-secondary_hover --lunia-text-secondary_hover Secondary text in the hover state. | #262626 neutral-800 | #e5e5e5 neutral-200 |
text-secondary_on-brand --lunia-text-secondary_on-brand Secondary text on solid brand backgrounds, such as CTA sections. | #e9d7fe brand-200 | #d4d4d4 neutral-300 |
text-tertiary --lunia-text-tertiary Tertiary text such as supporting text and paragraphs. | #525252 neutral-600 | #a3a3a3 neutral-400 |
text-tertiary_hover --lunia-text-tertiary_hover Tertiary text in the hover state. | #404040 neutral-700 | #d4d4d4 neutral-300 |
text-tertiary_on-brand --lunia-text-tertiary_on-brand Tertiary text on solid brand backgrounds, such as CTA sections. | #e9d7fe brand-200 | #a3a3a3 neutral-400 |
text-quaternary --lunia-text-quaternary Subtle, lower-contrast text such as footer column headings. | #737373 neutral-500 | #a3a3a3 neutral-400 |
text-quaternary_on-brand --lunia-text-quaternary_on-brand Quaternary text on solid brand backgrounds, such as footers. | #d6bbfb brand-300 | #a3a3a3 neutral-400 |
text-white --lunia-text-white Text that stays white in both light and dark mode. | #ffffff base-white | #ffffff base-white |
text-placeholder --lunia-text-placeholder Placeholder text in input fields. | #737373 neutral-500 | #a3a3a3 neutral-400 |
text-brand-primary --lunia-text-brand-primary Primary brand text for headings, such as pricing card titles. | #42307d brand-900 | #fafafa neutral-50 |
text-brand-secondary --lunia-text-brand-secondary Brand text for brand buttons, highlights and subheadings. | #6941c6 brand-700 | #d4d4d4 neutral-300 |
text-brand-secondary_hover --lunia-text-brand-secondary_hover Secondary brand text in the hover state, such as brand buttons. | #53389e brand-800 | #e5e5e5 neutral-200 |
text-brand-tertiary --lunia-text-brand-tertiary Lighter brand text, such as numbers in metric cards. | #7f56d9 brand-600 | #a3a3a3 neutral-400 |
text-brand-tertiary_alt --lunia-text-brand-tertiary_alt Tertiary brand text that turns near-white in dark mode. | #7f56d9 brand-600 | #fafafa neutral-50 |
text-error-primary --lunia-text-error-primary Error text, such as input field error messages. | #dc2626 red-600 | #f87171 red-400 |
text-warning-primary --lunia-text-warning-primary Warning text and warning messages. | #ca8a04 yellow-600 | #facc15 yellow-400 |
text-success-primary --lunia-text-success-primary Success text and success messages. | #16a34a green-600 | #4ade80 green-400 |
text-error-primary_hover --lunia-text-error-primary_hover Error text in the hover state, such as destructive link buttons. | #b91c1c red-700 | #fca5a5 red-300 |
Border colors
Colors for lines around inputs, cards and dividers.
| Token | Light | Dark |
|---|---|---|
border-primary --lunia-border-primary Default borders for cards, menus, tables, dividers and button groups. For the edge of an input or other control, use border-control. | #d4d4d4 neutral-300 | #404040 neutral-700 |
border-secondary --lunia-border-secondary Default border for most components, such as cards and dividers. | #e5e5e5 neutral-200 | #262626 neutral-800 |
border-secondary_alt --lunia-border-secondary_alt Translucent border for menus and popovers that sit over content. | #000000 at 10.2% colors-alpha-black-10 | #262626 neutral-800 |
border-tertiary --lunia-border-tertiary Low-contrast border for subtle dividers. | #f5f5f5 neutral-100 | #262626 neutral-800 |
border-brand --lunia-border-brand Brand border for focused and selected states. | #9e77ed brand-500 | #b692f6 brand-400 |
border-brand_alt --lunia-border-brand_alt Brand border that turns gray in dark mode. | #7f56d9 brand-600 | #404040 neutral-700 |
border-error --lunia-border-error Error border, such as on invalid input fields. | #ef4444 red-500 | #f87171 red-400 |
border-error_subtle --lunia-border-error_subtle Softer error border, such as on error alerts. | #fca5a5 red-300 | #ef4444 red-500 |
border-control --lunia-border-control Border of interactive controls when it is their only edge: inputs, text areas, code digits, selects, unchecked checkboxes and radios, secondary and utility buttons. Meets 3:1 on bg-primary and bg-secondary in both modes. | #8f8f8f neutral-450 | #737373 neutral-500 |
border-elevated --lunia-border-elevated Edge of floating surfaces such as tooltips and value labels. Near invisible in light mode, where the shadow does the work; a visible edge in dark mode, where shadows do not read. | #000000 at 10.2% colors-alpha-black-10 | #404040 neutral-700 |
border-control_hover --lunia-border-control_hover Border of inputs and text areas on pointer hover. One step stronger than border-control (neutral-500 light, neutral-400 dark). | #737373 neutral-500 | #a3a3a3 neutral-400 |
Foreground colors
Colors for icons and other small shapes that are not text.
| Token | Light | Dark |
|---|---|---|
fg-primary --lunia-fg-primary Highest-contrast icons and graphics. | #171717 neutral-900 | #ffffff base-white |
fg-secondary --lunia-fg-secondary High-contrast icons, such as in buttons and menus. | #404040 neutral-700 | #d4d4d4 neutral-300 |
fg-secondary_hover --lunia-fg-secondary_hover Secondary icons in the hover state. | #262626 neutral-800 | #e5e5e5 neutral-200 |
fg-tertiary --lunia-fg-tertiary Medium-contrast icons, such as close buttons. | #525252 neutral-600 | #a3a3a3 neutral-400 |
fg-tertiary_hover --lunia-fg-tertiary_hover Tertiary icons in the hover state. | #404040 neutral-700 | #d4d4d4 neutral-300 |
fg-quaternary --lunia-fg-quaternary Low-contrast icons, such as in input fields and help icons. | #a3a3a3 neutral-400 | #737373 neutral-500 |
fg-quaternary_hover --lunia-fg-quaternary_hover Quaternary icons in the hover state. | #737373 neutral-500 | #a3a3a3 neutral-400 |
fg-white --lunia-fg-white Icons that stay white in both light and dark mode. | #ffffff base-white | #ffffff base-white |
fg-brand-primary --lunia-fg-brand-primary Brand icons and graphics, such as progress bars and slider fills. | #7f56d9 brand-600 | #9e77ed brand-500 |
fg-brand-primary_alt --lunia-fg-brand-primary_alt Brand icons that turn gray in dark mode, such as active nav icons. | #7f56d9 brand-600 | #d4d4d4 neutral-300 |
fg-brand-secondary --lunia-fg-brand-secondary Lighter brand graphics, such as status dots and accents. | #9e77ed brand-500 | #9e77ed brand-500 |
fg-brand-secondary_alt --lunia-fg-brand-secondary_alt Lighter brand graphics that turn light gray in dark mode, such as link button icons. | #9e77ed brand-500 | #d4d4d4 neutral-300 |
fg-error-primary --lunia-fg-error-primary Error icons, such as in featured icons and alerts. | #dc2626 red-600 | #ef4444 red-500 |
fg-error-secondary --lunia-fg-error-secondary Lighter error icons, such as in input fields. | #ef4444 red-500 | #f87171 red-400 |
fg-warning-primary --lunia-fg-warning-primary Warning icons, such as in featured icons and alerts. | #ca8a04 yellow-600 | #eab308 yellow-500 |
fg-warning-secondary --lunia-fg-warning-secondary Lighter warning icons and graphics. | #eab308 yellow-500 | #facc15 yellow-400 |
fg-success-primary --lunia-fg-success-primary Success icons, such as in featured icons and alerts. | #16a34a green-600 | #22c55e green-500 |
fg-success-secondary --lunia-fg-success-secondary Lighter success icons and status dots. | #22c55e green-500 | #4ade80 green-400 |
fg-brand-secondary_hover --lunia-fg-brand-secondary_hover Secondary brand graphics in the hover state, such as link button icons. | #7f56d9 brand-600 | #e5e5e5 neutral-200 |
Background colors
Colors for surfaces, from the page itself to solid buttons and status areas.
| Token | Light | Dark |
|---|---|---|
bg-primary --lunia-bg-primary Primary background, such as the page and most components. | #ffffff base-white | #0a0a0a neutral-950 |
bg-primary_alt --lunia-bg-primary_alt Primary background that turns neutral-900 in dark mode, for raised surfaces. | #ffffff base-white | #171717 neutral-900 |
bg-primary_hover --lunia-bg-primary_hover Hover background for items on bg-primary, such as menu items. | #fafafa neutral-50 | #171717 neutral-900 |
bg-primary-solid --lunia-bg-primary-solid Dark solid background, such as tooltips. | #0a0a0a neutral-950 | #262626 neutral-800 |
bg-secondary --lunia-bg-secondary Secondary background for contrast with bg-primary, such as sections. | #fafafa neutral-50 | #171717 neutral-900 |
bg-secondary_alt --lunia-bg-secondary_alt Secondary background that matches bg-primary in dark mode. | #fafafa neutral-50 | #0a0a0a neutral-950 |
bg-secondary_hover --lunia-bg-secondary_hover Hover background for items on bg-secondary. | #f5f5f5 neutral-100 | #262626 neutral-800 |
bg-secondary-solid --lunia-bg-secondary-solid Medium gray solid background, such as gray dots and badges. | #525252 neutral-600 | #525252 neutral-600 |
bg-tertiary --lunia-bg-tertiary Tertiary background, such as disabled checkboxes and disabled toggle tracks. | #f5f5f5 neutral-100 | #262626 neutral-800 |
bg-quaternary --lunia-bg-quaternary Quaternary background, such as progress tracks. | #e5e5e5 neutral-200 | #404040 neutral-700 |
bg-overlay --lunia-bg-overlay Overlay behind modals and slideouts. | #0a0a0a neutral-950 | #262626 neutral-800 |
bg-brand-primary --lunia-bg-brand-primary Light brand background, such as brand featured icons. | #f9f5ff brand-50 | #9e77ed brand-500 |
bg-brand-primary_alt --lunia-bg-brand-primary_alt Light brand background that turns gray in dark mode. | #f9f5ff brand-50 | #262626 neutral-800 |
bg-brand-secondary --lunia-bg-brand-secondary Brand background with more contrast, such as text selection. | #f4ebff brand-100 | #7f56d9 brand-600 |
bg-brand-solid --lunia-bg-brand-solid Solid brand background, such as primary buttons and toggles. | #7f56d9 brand-600 | #7f56d9 brand-600 |
bg-brand-solid_hover --lunia-bg-brand-solid_hover Solid brand background in the hover state. | #6941c6 brand-700 | #865ddd brand-550 |
bg-brand-section --lunia-bg-brand-section Dark brand background for website sections, such as CTA sections. | #53389e brand-800 | #262626 neutral-800 |
bg-brand-section_subtle --lunia-bg-brand-section_subtle Softer brand section background, for use next to bg-brand-section. | #6941c6 brand-700 | #0a0a0a neutral-950 |
bg-error-primary --lunia-bg-error-primary Light error background, such as error alerts. | #fef2f2 red-50 | #450a0a red-950 |
bg-error-secondary --lunia-bg-error-secondary Error background with more contrast, such as error featured icons. | #fee2e2 red-100 | #dc2626 red-600 |
bg-error-solid --lunia-bg-error-solid Solid error background, such as destructive buttons. | #dc2626 red-600 | #dc2626 red-600 |
bg-error-solid_hover --lunia-bg-error-solid_hover Solid error background in the hover state. | #b91c1c red-700 | #b91c1c red-700 |
bg-warning-primary --lunia-bg-warning-primary Light warning background, such as warning alerts. | #fefce8 yellow-50 | #422006 yellow-950 |
bg-warning-secondary --lunia-bg-warning-secondary Warning background with more contrast, such as warning featured icons. | #fef9c3 yellow-100 | #ca8a04 yellow-600 |
bg-warning-solid --lunia-bg-warning-solid Solid warning background, such as warning badges and dots. | #ca8a04 yellow-600 | #ca8a04 yellow-600 |
bg-success-primary --lunia-bg-success-primary Light success background, such as success alerts. | #f0fdf4 green-50 | #052e16 green-950 |
bg-success-secondary --lunia-bg-success-secondary Success background with more contrast, such as success featured icons. | #dcfce7 green-100 | #16a34a green-600 |
bg-success-solid --lunia-bg-success-solid Solid success background, such as online status dots. | #16a34a green-600 | #16a34a green-600 |
bg-control-track --lunia-bg-control-track Track of a toggle in the off state and of a slider. Meets 3:1 against the page and against the white toggle knob in both modes. | #8f8f8f neutral-450 | #8f8f8f neutral-450 |
bg-control-track_hover --lunia-bg-control-track_hover Toggle track in the off state on hover. | #737373 neutral-500 | #737373 neutral-500 |
Focus rings colors
The ring color around the control that has keyboard focus.
| Token | Light | Dark |
|---|---|---|
focus-ring-error --lunia-focus-ring-error Focus ring color for fields in the error state. | #ef4444 red-500 | #ef4444 red-500 |
focus-ring --lunia-focus-ring Brand focus ring color for keyboard focus. | #9e77ed brand-500 | #9e77ed brand-500 |
Utility colors
Fixed hues for badges, tags and charts. The CSS variable is --lunia-utility-<hue>-<shade>. A shade ending in _alt is the version used on a tinted surface.
Neutral
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
- 800
- 900
Brand
- 50
- 50_alt
- 100
- 100_alt
- 200
- 200_alt
- 300
- 300_alt
- 400
- 400_alt
- 500Same in both modes
- 500_alt
- 600
- 600_alt
- 700
- 700_alt
- 800
- 800_alt
- 900
- 900_alt
Red
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Yellow
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Green
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Orange
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Blue
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Indigo
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Fuchsia
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Pink
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Purple
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Sky
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Slate
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Emerald
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Amber
- 50
- 100
- 200
- 300
- 400
- 500Same in both modes
- 600
- 700
Alpha colors
White and black at fixed opacity, for overlays and hover layers. The CSS variable is --lunia-alpha-<color>-<percent>. The checkerboard shows through where the color is not solid.
White
- white-10
- white-20
- white-30
- white-40
- white-50
- white-60
- white-70
- white-80
- white-90
- white-100
Black
- black-10
- black-20
- black-30
- black-40
- black-50
- black-60
- black-70
- black-80
- black-90
- black-100
Radius
Corner radius for controls and surfaces. Use a smaller radius for an element inside a rounded one.
- radius-none0px
- radius-xxs2px
- radius-xs4px
- radius-sm6px
- radius-md8px
- radius-lg10px
- radius-xl12px
- radius-2xl16px
- radius-3xl20px
- radius-4xl24px
- radius-fullfull
Spacing
Gaps and padding. In Tailwind, use the names: p-md, gap-xl. In CSS: var(--lunia-spacing-md). The numbered Tailwind classes, such as p-4, keep their usual size.
| Token | CSS variable | Value | Length |
|---|---|---|---|
| spacing-none | --lunia-spacing-none | 0px | |
| spacing-xxs | --lunia-spacing-xxs | 2px | |
| spacing-xs | --lunia-spacing-xs | 4px | |
| spacing-sm | --lunia-spacing-sm | 6px | |
| spacing-md | --lunia-spacing-md | 8px | |
| spacing-lg | --lunia-spacing-lg | 12px | |
| spacing-xl | --lunia-spacing-xl | 16px | |
| spacing-2xl | --lunia-spacing-2xl | 20px | |
| spacing-3xl | --lunia-spacing-3xl | 24px | |
| spacing-4xl | --lunia-spacing-4xl | 32px | |
| spacing-5xl | --lunia-spacing-5xl | 40px | |
| spacing-6xl | --lunia-spacing-6xl | 48px | |
| spacing-7xl | --lunia-spacing-7xl | 64px | |
| spacing-8xl | --lunia-spacing-8xl | 80px | |
| spacing-9xl | --lunia-spacing-9xl | 96px | |
| spacing-10xl | --lunia-spacing-10xl | 128px | |
| spacing-11xl | --lunia-spacing-11xl | 160px |
Widths
Widths for forms, panels and text columns. In Tailwind, max-w-md is the Lunia width-md (560px).
| Token | CSS variable | Value | Length |
|---|---|---|---|
| width-xxs | --lunia-width-xxs | 320px | |
| width-xs | --lunia-width-xs | 384px | |
| width-sm | --lunia-width-sm | 480px | |
| width-md | --lunia-width-md | 560px | |
| width-lg | --lunia-width-lg | 640px | |
| width-xl | --lunia-width-xl | 768px | |
| width-2xl | --lunia-width-2xl | 1024px | |
| width-3xl | --lunia-width-3xl | 1280px | |
| width-4xl | --lunia-width-4xl | 1440px | |
| width-5xl | --lunia-width-5xl | 1600px | |
| width-6xl | --lunia-width-6xl | 1920px | |
| paragraph-max-width | --lunia-paragraph-max-width | 720px |
| Token | CSS variable | Value | Length |
|---|---|---|---|
| container-padding-mobile | --lunia-container-padding-mobile | 16px | |
| container-padding-desktop | --lunia-container-padding-desktop | 32px | |
| container-max-width-desktop | --lunia-container-max-width-desktop | 1280px |
Shadows
Shadows for depth, from small to large. Focus ring shadows add the keyboard focus ring.
- shadow-xs--lunia-shadow-xs
- shadow-sm--lunia-shadow-sm
- shadow-md--lunia-shadow-md
- shadow-lg--lunia-shadow-lg
- shadow-xl--lunia-shadow-xl
- shadow-2xl--lunia-shadow-2xl
- shadow-3xl--lunia-shadow-3xl
- shadow-xs-skeuomorphic--lunia-shadow-xs-skeuomorphic
- shadow-skeuomorphic--lunia-shadow-skeuomorphic
- focus-ring-shadow-xs--lunia-focus-ring-shadow-xs
- focus-ring-shadow-sm--lunia-focus-ring-shadow-sm
- focus-ring-shadow-xs-skeuomorphic--lunia-focus-ring-shadow-xs-skeuomorphic
- focus-ring-error-shadow-xs--lunia-focus-ring-error-shadow-xs
- focus-ring-error-shadow-xs-skeuomorphic--lunia-focus-ring-error-shadow-xs-skeuomorphic
Typography
Inter for text and display styles, Geist Mono for file names, code and command output. The CSS variables are --lunia-font-family-body, --lunia-font-family-display and --lunia-font-family-mono.
Display 2xl
72px / 90px / -0.02em
Motion that explains
Regular 400, Medium 500, Semibold 600, Bold 700
Display xl
60px / 72px / -0.02em
Motion that explains
Regular 400, Medium 500, Semibold 600, Bold 700
Display lg
48px / 60px / -0.02em
Motion that explains
Regular 400, Medium 500, Semibold 600, Bold 700
Display md
36px / 44px / -0.02em
Motion that explains
Regular 400, Medium 500, Semibold 600, Bold 700
Display sm
30px / 38px
Motion that explains
Regular 400, Medium 500, Semibold 600, Bold 700
Display xs
24px / 32px
Motion that explains
Regular 400, Medium 500, Semibold 600, Bold 700
Text xl
20px / 30px
Motion that explains
Regular 400, Medium 500, Semibold 600, Bold 700
Text lg
18px / 28px
Motion that explains
Regular 400, Medium 500, Semibold 600, Bold 700
Text md
16px / 24px
Motion that explains
Regular 400, Medium 500, Semibold 600, Bold 700
Text sm
14px / 20px
Motion that explains
Regular 400, Medium 500, Semibold 600, Bold 700
Mono Regular src/button/button.tsx
Mono Medium src/button/button.tsx
Text xs
12px / 18px
Motion that explains
Regular 400, Medium 500, Semibold 600, Bold 700
Mono Regular src/button/button.tsx
Mono Medium src/button/button.tsx