Skip to content
Vertical Jump Designs-uiFront-End Studio
Get Pro

v3.9 is out.

Get started

Design tokens

Design tokens are the CSS variables behind the library's look. Use them in your own styles so custom UI matches the components and follows the active theme. Values shown here are live: switch the site's mode to see them change.

Using tokens

Tokens are CSS custom properties set on :root by the library's stylesheet. Reference them with var(). Color tokens change with the mode and brand, so styles written with them follow every theme automatically.

Promo.module.csscss
.promo {
  padding: var(--space-6);
  color: var(--color-text);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-normal) var(--ease-spring);
}

.promo:hover {
  transform: translateY(calc(-1 * var(--lift-distance)));
}

Tailwind CSS

Using Tailwind CSS v4? The library ships a preset that turns the tokens into utilities, so your own layouts match the components. Import it after Tailwind, and keep importing the library's stylesheet as usual.

app.csscss
@import "tailwindcss";
@import "@vjdesigns/vjdesigns-ui/tailwind.css";
tsx
<section className="bg-surface text-text rounded-xl shadow-md p-6">
  <h2 className="font-display text-2xl tracking-tight">Season stats</h2>
  <p className="text-text-muted">Updated after every game.</p>
  <span className="bg-accent text-on-accent rounded-control px-3">New</span>
</section>

Every utility points at a token (bg-primary is var(--color-primary)), so Tailwind classes follow the mode, brand and accent exactly like the components, with no dark: variants needed. Tailwind's spacing (p-4 is 1rem) and breakpoints already match. For readable text, use the pairs the components use: text-text or text-text-muted on the surfaces, text-on-primary on bg-primary, and text-primary-subtle-text on bg-primary-subtle (likewise for each tone). Don't use accent or chart colors for text.

Some Tailwind names take the library's values: rounded-*, shadow-*, leading-*, the text-* sizes and the font weights (rounded-md is 12px, font-black is 800), and max-w-md and @md: are 48rem. The preset doesn't change the components, and Tailwind's CSS reset doesn't override them.

Color

Surfaces and text

Surface and text colors
TokenValuePreview
--color-bg
--color-surface
--color-surface-raised
--color-surface-sunken
--color-surface-hover
--color-surface-active
--color-overlay
--color-text
--color-text-muted
--color-text-disabled
--color-text-inverse
--color-border
--color-border-strong
--color-border-input

Primary (from the brand)

Primary colors
TokenValuePreview
--color-primary
--color-primary-hover
--color-primary-active
--color-on-primary
--color-primary-subtle
--color-primary-subtle-hover
--color-primary-subtle-text
--color-primary-border
--color-link-visited

Tones

Every tone has the same set of roles, named --color-{tone}, --color-{tone}-hover, -active, --color-on-{tone} (text on the solid fill), -subtle, -subtle-hover, -subtle-text (text on the subtle fill) and -border. Each text pairing meets 4.5:1 contrast.

neutral
subtle
  • Solid
  • Hover
  • Pressed
  • Subtle
  • Subtle hover
  • Border
accent
subtle
  • Solid
  • Hover
  • Pressed
  • Subtle
  • Subtle hover
  • Border
success
subtle
  • Solid
  • Hover
  • Pressed
  • Subtle
  • Subtle hover
  • Border
warning
subtle
  • Solid
  • Hover
  • Pressed
  • Subtle
  • Subtle hover
  • Border
danger
subtle
  • Solid
  • Hover
  • Pressed
  • Subtle
  • Subtle hover
  • Border
info
subtle
  • Solid
  • Hover
  • Pressed
  • Subtle
  • Subtle hover
  • Border

Focus

Focus ring
TokenValue
--focus-ring-color
--focus-ring-width
--focus-ring-offset

Typography

Font families
TokenValuePreview
--font-displayQuick brown fox
--font-bodyQuick brown fox
--font-monoQuick brown fox
Font sizes
TokenValuePreview
--font-size-xsAg
--font-size-smAg
--font-size-mdAg
--font-size-lgAg
--font-size-xlAg
--font-size-2xlAg
--font-size-3xlAg
--font-size-4xlAg
--font-size-5xlAg
--font-size-6xlAg
Font weights
TokenValuePreview
--font-weight-regularAg
--font-weight-mediumAg
--font-weight-semiboldAg
--font-weight-boldAg
--font-weight-blackAg
Line height and letter spacing
TokenValue
--line-height-tight
--line-height-snug
--line-height-normal
--line-height-relaxed
--letter-spacing-tight
--letter-spacing-normal
--letter-spacing-wide
--letter-spacing-caps

Spacing

A 4px-based scale. Components that take a gap, p or spacing prop use these step numbers, so gap={4} means var(--space-4).

Spacing scale
TokenValuePreview
--space-0
--space-0-5
--space-1
--space-1-5
--space-2
--space-3
--space-4
--space-5
--space-6
--space-8
--space-10
--space-12
--space-16
--space-20
--space-24

Radius

Corner radius
TokenValuePreview
--radius-none
--radius-xs
--radius-sm
--radius-md
--radius-lg
--radius-xl
--radius-2xl
--radius-pill
--control-radius
--field-radius

Shadow

Shadows
TokenValuePreview
--shadow-xs
--shadow-sm
--shadow-md
--shadow-lg
--shadow-xl

Sizing

Control and icon sizes
TokenValue
--control-height-sm
--control-height-md
--control-height-lg
--target-size-min
--icon-size-xs
--icon-size-sm
--icon-size-md
--icon-size-lg
--icon-size-xl
--icon-size-2xl
--border-width
--border-width-thick

Motion

Components animate with these durations and easings. When someone has asked their system to reduce motion, the library shortens or removes animations for you.

Durations and easings
TokenValue
--duration-instant
--duration-fast
--duration-normal
--duration-slow
--ease-standard
--ease-out
--ease-in
--ease-spring
--press-scale
--enter-scale

Layering

Z-index layers
TokenValue
--z-base
--z-sticky
--z-overlay
--z-modal
--z-popover
--z-dropdown
--z-toast
--z-tooltip
--z-skip-link

Breakpoints

Responsive props (such as columns={{ base: 1, md: 2 }}) are mobile first: each key applies from its width up. CSS variables can't be used in media queries, so these are exported as breakpoints for use in JavaScript.

Breakpoints
KeyApplies from
sm640px
md768px
lg1024px
xl1280px
2xl1536px