Skip to main content
Full documentation available at velinstyle.info — This is the quick reference. Visit the full docs for 80+ pages with live examples, API tables, and guides.

Design Tokens

Default palette targets WCAG 2.2 AAA (7:1) for text on surfaces. Use data-velin-contrast="aa" on <html> for lighter AA text. Run npm run test:contrast — see generated color reference and Accessibility.

Colors (OKLCH)

--velin-color-primary
--velin-color-secondary
--velin-color-success
--velin-color-warning
--velin-color-danger
--velin-color-info
--velin-color-surface
--velin-color-surface-dim
--velin-color-text
--velin-color-border

Typography Scale (1.25x Major Third)

text-5xl (3.815rem)

text-4xl (3.052rem)

text-3xl (2.441rem)

text-2xl (1.953rem)

text-xl (1.563rem)

text-lg (1.25rem)

text-base (1rem)

text-sm (0.8rem)

text-xs (0.64rem)

Spacing

1
2
3
4
5
6
8
10
12
16

Border Radius

none
xs
sm
md
lg
xl
full

Shadows

xs
sm
md
lg
xl
2xl

Aspect Ratio

TokenValuePreview
--velin-aspect-square1 / 1
--velin-aspect-video16 / 9
--velin-aspect-photo4 / 3
--velin-aspect-portrait3 / 4
--velin-aspect-wide21 / 9
--velin-aspect-golden1.618 / 1

Z-Index Scale

Prevents z-index wars by providing a predefined layer hierarchy.

TokenValueUsage
--velin-z-hide-1Hidden elements
--velin-z-base0Default layer
--velin-z-raised1Slightly elevated
--velin-z-dropdown100Dropdown menus
--velin-z-sticky200Sticky headers
--velin-z-navbar300Navigation bars
--velin-z-overlay400Overlay backgrounds
--velin-z-modal500Modals, drawers
--velin-z-toast600Toast notifications
--velin-z-tooltip700Tooltips
--velin-z-max9999Topmost layer

Motion / Transitions

Duration and easing tokens for consistent animation behavior.

Durations

TokenValue
--velin-duration-instant50ms
--velin-duration-fast100ms
--velin-duration-normal200ms
--velin-duration-slow300ms
--velin-duration-slower500ms

Easing Curves

TokenValue
--velin-ease-defaultcubic-bezier(0.4, 0, 0.2, 1)
--velin-ease-incubic-bezier(0.4, 0, 1, 1)
--velin-ease-outcubic-bezier(0, 0, 0.2, 1)
--velin-ease-in-outcubic-bezier(0.4, 0, 0.2, 1)
--velin-ease-bouncecubic-bezier(0.34, 1.56, 0.64, 1)

Transition Presets

TokenProperties
--velin-transition-colorscolor, background-color, border-color
--velin-transition-opacityopacity
--velin-transition-transformtransform
--velin-transition-shadowbox-shadow
--velin-transition-allall properties

Theme waehlen