Global Design Tokens
Defined in :root — available everywhere, inherited by all components.
Spacing
Five named sizes. The p, px, m, etc. style props resolve these tokens automatically.
--dv-spacing-xs0.5rem8pxCompact gaps, tight padding--dv-spacing-sm0.75rem12pxSmall gaps, input padding--dv-spacing-md1rem16pxDefault component padding--dv-spacing-lg1.5rem24pxSection spacing, card padding--dv-spacing-xl2rem32pxLarge sections, page margins/* Override globally or scope to a section */
:root { --dv-spacing-md: 0.875rem; }
.compact-ui { --dv-spacing-md: 0.75rem; }
Radius
Override --dv-radius-default to restyle border-radius across all components at once — or target individual sizes for fine control.
--dv-radius-xs0.125rem2pxSubtle rounding — code, labels--dv-radius-sm0.25rem4pxButtons, inputs--dv-radius-md0.5rem8pxCards, modals, panels--dv-radius-lg1rem16pxPill buttons, large cards--dv-radius-xl2rem32pxDecorative, fully rounded--dv-radius-default0.25rem4pxComponent fallback (= sm) — override to restyle all at once/* Square corners everywhere */
:root { --dv-radius-default: 0; }
Typography
Font sizes
Five sizes aligned with the spacing scale. Used by the fz style prop.
--dv-font-size-xsAa0.75rem12pxLabels, captions, badges
--dv-font-size-smAa0.875rem14pxSecondary text, table cells
--dv-font-size-mdAa1rem16pxBody text (default)
--dv-font-size-lgAa1.125rem18pxEmphasized body, lead text
--dv-font-size-xlAa1.25rem20pxSubheadings, card titles
Line heights
| Token | Value | Used for |
|---|
--dv-line-height-xs | 1.4 | Compact text, single-line elements |
--dv-line-height-sm | 1.45 | Dense text, tooltips |
--dv-line-height-md | 1.55 | Body text (default) |
--dv-line-height-lg | 1.6 | Comfortable reading |
--dv-line-height-xl | 1.65 | Open, airy long-form text |
Font families
| Token | Default |
|---|
--dv-font-family | -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif |
--dv-font-family-monospace | ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace |
--dv-font-family-headings | var(--dv-font-family) — override to use a display typeface |
--dv-heading-font-weight | 700 |
Heading scale
Each level exposes -font-size, -font-weight, and -line-height tokens consumed by the Title component.
H1--dv-h1-font-size2.125rem / lh 1.3
H2--dv-h2-font-size1.625rem / lh 1.35
H3--dv-h3-font-size1.375rem / lh 1.4
H4--dv-h4-font-size1.125rem / lh 1.45
H5--dv-h5-font-size1rem / lh 1.5
H6--dv-h6-font-size0.875rem / lh 1.5
Shadows
Decorative named shadows — same in light and dark mode. For depth-based shadows tied to component layer, see Elevation.
| Token | Visual | Used for |
|---|
--dv-shadow-xs | | Hairline ambient |
--dv-shadow-sm | | Small spread, subtle ambient base |
--dv-shadow-md | | Medium spread, floating feel |
--dv-shadow-lg | | Large spread, soft and diffuse |
--dv-shadow-xl | | Extra-large spread, maximum decorative depth |
Elevation
Six depth levels (0–5) that adapt between light and dark mode. See Elevation for the full visual reference.
| Token | Light | Dark | Used by |
|---|
--dv-elevation-0 | none | none | Flat — body, inline content |
--dv-elevation-1 | 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.1) | 0 1px 3px rgba(0,0,0,.3) | Buttons (rest), chips |
--dv-elevation-2 | 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06) | 0 4px 5px rgba(0,0,0,.35) | Buttons (hover), cards |
--dv-elevation-3 | 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05) | 0 6px 6px rgba(0,0,0,.4) | Dropdowns, notifications |
--dv-elevation-4 | 0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04) | 0 8px 7px rgba(0,0,0,.45) | Modal, Drawer |
--dv-elevation-5 | 0 25px 50px rgba(0,0,0,.25) | 0 10px 8px rgba(0,0,0,.5) | Menus, context menus |
Z-index scale
Seven named layers. Override a single token to resolve stacking conflicts — no need to dig into component internals.
--dv-z-raised1Hover borders, indicator badges, timeline bullets, slider thumbs
--dv-z-navbar100AppShell fixed header, navbar, footer (base; sections use +1 / +2)
--dv-z-overlay200Overlay component — full-area dimming backdrops
--dv-z-modal300Modal, Drawer
--dv-z-popover400Menu, Select, ColorSchemePicker compact panel
--dv-z-notification600Toast, Notification
/* Shift the entire popover/modal layer up to avoid a third-party conflict */
:root {
--dv-z-modal: 1300;
--dv-z-popover: 1400;
--dv-z-tooltip: 1500;
}
Surface layers
Six tinted backgrounds that reinforce depth in dark mode without relying on shadow contrast. See Elevation for the visual reference.
| Token | Light | Dark | Used for |
|---|
--dv-surface-0 | var(--dv-color-body) | #1a1b1e | Page background |
--dv-surface-1 | #f9f9f9 | #22232a (+ primary tint) | Sidebar, nav, primary panels |
--dv-surface-2 | #f4f4f4 | #252730 (+ primary tint) | Cards, inputs, secondary panels |
--dv-surface-3 | #f0f0f0 | #282b35 (+ primary tint) | Modal / drawer backgrounds |
--dv-surface-4 | #ececec | #292c37 (+ primary tint) | Floating panels |
--dv-surface-5 | #e8e8e8 | #2b2f3b (+ primary tint) | Tooltips, top-most overlays |
Semantic colors
High-level color aliases for body, text, borders, and surfaces. These switch automatically between light and dark mode. Override them to retheme the entire UI without touching individual palette values.
| Token | Light | Dark | Used for |
|---|
--dv-color-body | #fff | #1a1b1e | Page background |
--dv-color-surface | gray-0 (#f8f9fa) | #25262b | Panel / sidebar background |
--dv-color-text | gray-9 (#212529) | #c1c2c5 | Primary text |
--dv-color-border | gray-3 (#dee2e6) | #373a40 | Dividers, input borders |
--dv-color-dimmed | gray-6 (#868e96) | gray-5 | Secondary / muted text |
--dv-color-white | #fff | #fff | Always white — icon fills, etc. |
--dv-color-black | #1c1c1c | #1c1c1c | Always near-black |
--dv-color-bright | #000 | #fff | Highest-contrast foreground |
--dv-color-default | #fff | #25262b | Default-variant background |
--dv-color-default-hover | gray-0 | #2c2e33 | Default-variant hover background |
--dv-color-default-color | gray-9 | #c1c2c5 | Default-variant text color |
--dv-color-default-border | gray-4 (#ced4da) | #373a40 | Default-variant border |
State colors
Semantic aliases for validation and feedback states. They resolve to named-color filled tokens so they automatically adopt the correct shade for light/dark mode.
| Token | Default value | Used for |
|---|
--dv-color-error | var(--dv-color-red-filled) | Error states, destructive actions |
--dv-color-success | var(--dv-color-green-filled) | Success states, confirmations |
--dv-color-warning | var(--dv-color-yellow-filled) | Warning states, caution |
--dv-color-info | var(--dv-color-blue-filled) | Informational messages |
/* Remap state colors to any named palette */
:root {
--dv-color-error: var(--dv-color-crimson-filled);
--dv-color-success: var(--dv-color-teal-filled);
}
Focus ring
A single token controls keyboard focus outlines across all interactive components. Override it to restyle focus states everywhere at once.
| Token | Default value |
|---|
--dv-focus-ring | 0 0 0 0.1875rem color-mix(in srgb, var(--dv-color-primary-filled) 35%, transparent) |
/* Solid 2px focus ring instead of the default glow */
:root {
--dv-focus-ring: 0 0 0 2px var(--dv-color-primary-filled);
}
Primary color
The primary color is an alias layer — 9 tokens that point at whatever named color you designate as your brand color. Defaults to blue. Override all 9 to switch the accent color of every component at once.
| Token | Default | Used for |
|---|
--dv-color-primary-filled | var(--dv-color-blue-filled) | Primary filled background |
--dv-color-primary-filled-hover | var(--dv-color-blue-filled-hover) | Hover state of filled |
--dv-color-primary-filled-color | var(--dv-color-blue-filled-color) | Text on filled background |
--dv-color-primary-light | var(--dv-color-blue-light) | Light variant background |
--dv-color-primary-light-hover | var(--dv-color-blue-light-hover) | Hover state of light |
--dv-color-primary-light-color | var(--dv-color-blue-light-color) | Text on light background |
--dv-color-primary-outline | var(--dv-color-blue-outline) | Outline variant border color |
--dv-color-primary-outline-hover | var(--dv-color-blue-outline-hover) | Hover background of outline |
--dv-color-primary-outline-color | var(--dv-color-blue-outline-color) | Text in outline variant |
/* Switch primary color to violet */
:root {
--dv-color-primary-filled: var(--dv-color-violet-filled);
--dv-color-primary-filled-hover: var(--dv-color-violet-filled-hover);
--dv-color-primary-filled-color: var(--dv-color-violet-filled-color);
--dv-color-primary-light: var(--dv-color-violet-light);
--dv-color-primary-light-hover: var(--dv-color-violet-light-hover);
--dv-color-primary-light-color: var(--dv-color-violet-light-color);
--dv-color-primary-outline: var(--dv-color-violet-outline);
--dv-color-primary-outline-hover: var(--dv-color-violet-outline-hover);
--dv-color-primary-outline-color: var(--dv-color-violet-outline-color);
}
Named color variants
Every named color in the palette also gets three variant token sets — filled, light, and outline — used by the color prop on Button, Badge, Alert, and similar components. See Color Palette and Colors for visual references.
| Token pattern | Description |
|---|
| --dv-color-{name}-filled | Solid fill background |
| --dv-color-{name}-filled-hover | Solid fill hover background |
| --dv-color-{name}-filled-color | Text on solid fill |
| --dv-color-{name}-light | Translucent tint background |
| --dv-color-{name}-light-hover | Tint hover background |
| --dv-color-{name}-light-color | Text on tint background |
| --dv-color-{name}-outline | Outline border color |
| --dv-color-{name}-outline-hover | Outline hover background |
| --dv-color-{name}-outline-color | Text in outline variant |
Available {name} values: red · crimson · pink · grape · violet · indigo · blue · cyan · teal · green · lime · yellow · orange · gray · dark · white · black · primary
Raw palette shades (--dv-color-{name}-{0–9}) are documented on the Color Palette page.
Motion
Duration and easing tokens consumed by all component transitions and animations. See Motion for interactive previews.
| Token | Value | Used for |
|---|
--dv-motion-duration-instant | 50ms | Focus rings, micro-feedback |
--dv-motion-duration-fast | 100ms | Hover states, border-color, focus |
--dv-motion-duration-normal | 200ms | Standard transitions — buttons, tabs |
--dv-motion-duration-slow | 400ms | Structural movement — burger, progress |
--dv-motion-duration-deliberate | 700ms | Emphasis, large orchestrated shifts |
--dv-motion-ease-standard | cubic-bezier(0.4, 0, 0.2, 1) | Default — balanced in/out |
--dv-motion-ease-enter | cubic-bezier(0, 0, 0.2, 1) | Elements entering (decelerates to stop) |
--dv-motion-ease-exit | cubic-bezier(0.4, 0, 1, 1) | Elements leaving (accelerates away) |
--dv-motion-ease-spring | linear(…) | Modals, drawers — overshoots and settles |
Component Override Variables
Each component exposes CSS custom properties on its root element. Set them on the component itself, a parent container, or :root to customise behaviour without writing new selectors.
/* Three ways to override a component variable */
/* 1. On a specific instance via the style prop */
<Slider style="--dv-slider-color: var(--dv-color-green-filled);" />
/* 2. Scoped to a parent container */
.settings-panel { --dv-input-radius: 0; }
/* 3. Globally in :root */
:root { --dv-tooltip-bg: var(--dv-color-violet-filled); }
AppShell
| Token | Default | Controls |
|---|
--dv-shell-z-index | var(--dv-z-navbar) | Base z-index for all fixed shell sections |
--dv-shell-padding | var(--dv-spacing-md) | Inner padding of the main content area |
--dv-shell-transition | var(--dv-motion-duration-normal) | Slide duration for navbar / aside open/close |
--dv-shell-header-height | 0px (set by component) | Fixed header height (managed via props) |
--dv-shell-footer-height | 0px (set by component) | Fixed footer height (managed via props) |
--dv-shell-navbar-width | 0px (set by component) | Navbar width (managed via props) |
--dv-shell-aside-width | 0px (set by component) | Aside width (managed via props) |
AspectRatio
| Token | Default | Controls |
|---|
--dv-ar-ratio | 1 | Width-to-height ratio (e.g. 16/9) |
BackgroundImage
| Token | Default | Controls |
|---|
--dv-bg-image-url | none | CSS url() value for the background image |
--dv-bg-image-radius | 0 | Border radius applied to the image container |
Badge
| Token | Default | Controls |
|---|
--dv-badge-bg | var(--dv-color-primary-light) | Badge background |
--dv-badge-color | var(--dv-color-primary-light-color) | Badge text color |
--dv-badge-bd | 1px solid transparent | Badge border |
Blockquote
| Token | Default | Controls |
|---|
--dv-bq-bg | var(--dv-color-surface) | Blockquote background |
--dv-bq-bd | 4px solid …border | Left border (color + width) |
--dv-bq-radius | var(--dv-radius-sm) | Corner radius |
--dv-bq-icon-size | 1.5rem | Quote icon size |
Burger
| Token | Default | Controls |
|---|
--dv-burger-size | 30px | Overall button size |
--dv-burger-color | currentColor | Line color |
--dv-burger-line-size | 2px | Line thickness |
--dv-burger-transition | var(--dv-motion-duration-slow) | Animation duration for open/close |
Checkbox
| Token | Default | Controls |
|---|
--dv-checkbox-size | var(--dv-checkbox-size-md) = 1.25rem | Checkbox box size |
--dv-checkbox-radius | var(--dv-radius-sm) | Checkbox corner radius |
--dv-checkbox-color | var(--dv-color-primary-filled) | Checked fill color |
--dv-checkbox-icon-color | #fff | Checkmark icon color |
Code
| Token | Default | Controls |
|---|
--dv-code-bg | var(--dv-color-surface) | Background of code blocks |
ColorSwatch
| Token | Default | Controls |
|---|
--dv-cs-size | var(--dv-cs-size-md) = 32px | Swatch width / height |
--dv-cs-radius | 50% | Corner radius |
--dv-cs-color | transparent | Fill color (set via color prop) |
Drawer
| Token | Default | Controls |
|---|
--dv-drawer-width | 15rem–50rem (size-dependent) | Panel width (side drawers) |
--dv-drawer-height | 12rem–30rem (size-dependent) | Panel height (top/bottom drawers) |
Fieldset
| Token | Default | Controls |
|---|
--dv-fieldset-radius | var(--dv-radius-sm) | Fieldset border radius |
Flex
| Token | Default | Controls |
|---|
--dv-flex-gap | 0 | Gap between flex children |
--dv-flex-row-gap | var(--dv-flex-gap) | Row gap override |
--dv-flex-col-gap | var(--dv-flex-gap) | Column gap override |
--dv-flex-align | stretch | align-items value |
--dv-flex-justify | flex-start | justify-content value |
--dv-flex-direction | row | flex-direction value |
--dv-flex-wrap | nowrap | flex-wrap value |
Indicator
| Token | Default | Controls |
|---|
--dv-ind-color | var(--dv-color-primary-filled) | Badge dot color |
--dv-ind-size | 10px | Badge dot diameter |
--dv-ind-offset | 0px | Inset distance from the container edge |
Input (shared)
| Token | Default | Controls |
|---|
--dv-input-fz | var(--dv-input-fz-md) = var(--dv-font-size-sm) | Input font size |
--dv-input-size | var(--dv-input-size-md) = 2.625rem | Input height |
--dv-input-radius | var(--dv-radius-sm) | Input corner radius |
Kbd
| Token | Default | Controls |
|---|
--dv-kbd-fz | var(--dv-font-size-xs) | Keyboard key font size |
--dv-kbd-padding | 2px 6px | Keyboard key padding |
List
| Token | Default | Controls |
|---|
--dv-list-fz | var(--dv-font-size-md) | List item font size |
--dv-list-spacing | 0 | Gap between list items |
--dv-list-style-type | disc | CSS list-style-type (ul) or decimal (ol) |
Loader
| Token | Default | Controls |
|---|
--dv-loader-size | var(--dv-loader-size-md) = 36px | Spinner diameter |
Mark
| Token | Default | Controls |
|---|
--dv-mark-bg | var(--dv-color-yellow-light) | Highlight background color |
NavLink
| Token | Default | Controls |
|---|
--dv-nl-bg | transparent | Resting background |
--dv-nl-hover | var(--dv-color-surface) | Hover background |
--dv-nl-color | var(--dv-color-text) | Text color (active: primary-light-color) |
NativeSelect
| Token | Default | Controls |
|---|
--dv-native-select-color | var(--dv-color-primary-filled) | Arrow / accent color |
Overlay
| Token | Default | Controls |
|---|
--dv-overlay-color | #000 | Background fill color |
--dv-overlay-opacity | 0.5 | Fill opacity (0–1) |
--dv-overlay-blur | 4px (when blur is enabled) | Backdrop blur amount |
--dv-overlay-z | var(--dv-z-overlay) | z-index override |
Pagination
| Token | Default | Controls |
|---|
--dv-pagination-fz | var(--dv-font-size-sm) | Page control font size |
--dv-pagination-radius | 0.25rem | Control corner radius |
--dv-pagination-color | var(--dv-color-primary-filled) | Active page accent color |
Pill
| Token | Default | Controls |
|---|
--dv-pill-height | var(--dv-pill-height-sm) = 1.25rem | Pill height |
--dv-pill-fz | var(--dv-pill-fz-sm) = 0.625rem | Pill font size |
--dv-pill-radius | 10000px | Pill corner radius |
Progress
| Token | Default | Controls |
|---|
--dv-progress-size | var(--dv-progress-size-md) = 12px | Bar height |
--dv-progress-radius | var(--dv-radius-xl) | Bar corner radius |
Radio
| Token | Default | Controls |
|---|
--dv-radio-size | var(--dv-radio-size-md) = 1.25rem | Radio button size |
--dv-radio-color | var(--dv-color-primary-filled) | Checked fill color |
--dv-radio-icon-color | #fff | Inner dot color |
Rating
| Token | Default | Controls |
|---|
--dv-rating-color | var(--dv-color-yellow-filled) | Star fill color |
--dv-rating-size | 1.5rem | Star size |
RingProgress
| Token | Default | Controls |
|---|
--dv-rp-size | 120px | Ring diameter |
ScrollArea
| Token | Default | Controls |
|---|
--dv-scroll-size | 6px | Scrollbar track thickness |
SegmentedControl
| Token | Default | Controls |
|---|
--dv-segmented-fz | var(--dv-segmented-fz-md) = font-size-sm | Segment font size |
--dv-segmented-radius | var(--dv-radius-sm) | Corner radius |
--dv-segmented-track | var(--dv-color-gray-2) | Track (inactive) background |
--dv-segmented-color | var(--dv-color-default) | Active segment background |
--dv-segmented-active-text | var(--dv-color-default-color) | Active segment text color |
SimpleGrid
| Token | Default | Controls |
|---|
--dv-sg-cols | 1 | Number of columns |
--dv-sg-spacing | var(--dv-spacing-md) | Gap between cells |
--dv-sg-v-spacing | var(--dv-sg-spacing) | Row gap (defaults to spacing) |
Skeleton
| Token | Default | Controls |
|---|
--dv-skeleton-height | 1rem | Skeleton block height |
--dv-skeleton-width | 100% | Skeleton block width |
--dv-skeleton-radius | var(--dv-radius-sm) | Corner radius |
Slider
| Token | Default | Controls |
|---|
--dv-slider-color | var(--dv-color-primary-filled) | Filled track and thumb color |
--dv-slider-size | 0.5rem | Track height |
--dv-slider-radius | 999px | Track corner radius |
Stepper
| Token | Default | Controls |
|---|
--dv-stepper-fz | var(--dv-font-size-sm) | Step label font size |
--dv-stepper-step-radius | 50% | Step indicator corner radius |
Switch
| Token | Default | Controls |
|---|
--dv-switch-size | var(--dv-switch-size-md) = 1.25rem | Track height |
--dv-switch-radius | 9999px | Track corner radius |
--dv-switch-color | var(--dv-color-primary-filled) | Checked fill color |
Table
| Token | Default | Controls |
|---|
--dv-table-hz-spacing | var(--dv-spacing-xs) | Horizontal cell padding |
--dv-table-v-spacing | var(--dv-spacing-xs) | Vertical cell padding |
--dv-table-border-color | var(--dv-color-border) | Cell border color |
--dv-table-caption-side | bottom | CSS caption-side value |
ThemeIcon
| Token | Default | Controls |
|---|
--dv-ti-size | var(--dv-ti-size-md) = 2rem | Icon container size |
--dv-ti-radius | var(--dv-radius-default) | Corner radius |
Timeline
| Token | Default | Controls |
|---|
--dv-timeline-bullet-size | 1.25rem | Bullet circle diameter |
--dv-timeline-line-width | 2px | Connecting line width |
--dv-timeline-bullet-radius | 50% | Bullet corner radius |
--dv-timeline-item-color | var(--dv-color-primary-filled) | Active item accent color |
Tooltip
| Token | Default | Controls |
|---|
--dv-tooltip-bg | var(--dv-color-gray-9) | Tooltip background |
--dv-tooltip-color | #fff | Tooltip text color |
Transition
| Token | Default | Controls |
|---|
--dv-transition-duration | var(--dv-motion-duration-normal) | Enter/exit transition duration |
--dv-transition-easing | var(--dv-motion-ease-enter) | Enter/exit easing curve |