Figma v3 docsView v2 docs

Design Tokens and Variables in shadcncraft

Understand how design tokens and variables power theming in shadcncraft. Learn how to manage colors, spacing, typography, and layout tokens in Figma.
PreviousNext

How design tokens are organized into collections changed in v3 of the kit. Not sure which version you have? See how to tell which version you're using.

Collections

v3 organizes every design token into three variable collections. They reference each other in a clear chain: components point at Mode, Mode resolves through Style, and Style is built on Tailwind primitives.

1. Tailwind

A single-mode collection of raw, utility-first primitives that mirror Tailwind's scale. These are the lowest-level values in the system. Nothing references anything beneath them. It replaces the Primitives collection from v2.

GroupUsage
spacingThe Tailwind spacing scale: padding, gap and margin values
border-radiusCorner-radius primitives
border-widthStroke-thickness primitives
fontType-scale primitives: font size, weight and line height
widthWidth primitives for components and elements
max-widthMinimum and maximum width constraints
heightHeight primitives for components and elements
opacityTransparency steps
colorsThe raw color palette that the Style collection resolves from
ring-widthFocus-ring thickness primitives
shadowsShadow primitives: the raw values behind each shadow
proPrimitives specific to the Pro kit
metaKit metadata, such as the library version

2. Style

Style is the theming heart of v3. It is a multi-mode collection where each mode is a complete, named visual style: color palette, radii, shadows, spacing rhythm, typography and icon set all defined together. shadcncraft ships eight styles out of the box:

  • Nova
  • Vega
  • Maia
  • Lyra
  • Mira
  • Luma
  • Sera
  • Rhea

Switching the active Style mode re-themes the entire library in one move. The Style collection takes over the role the Theme collection played in v2.

There's no need to learn every variable in here. Work at the group level. Each group is summarized below:

GroupUsage
colorPer-style color resolutions for light and dark mode
icon-libraryBoolean toggles for the active icon set (Lucide, Remix, Phosphor, Tabler, Huge)
fontThe sans, serif, mono and heading typefaces
proThe Pro spacing scale used for padding, gaps and margins across blocks
radiusThe semantic radius scale (radius/smradius/4xl), resolved per style
shadowPer-style shadow definitions
textThe per-style type scale: font size and line height for each step (text-xstext-9xl)
focus-ringThe focus-ring token, resolved per style
componentPer-component tokens such as component/card/radius or component/input/bg

3. Mode

Mode is the collection you apply to elements. It has two modes, Light and Dark, and its variables alias into the Style collection. A component bound to a Mode color automatically reflects whichever Style is active and whether the page is in light or dark mode.

GroupUsage
RootThe core UI colors (primary, background, border, muted, …)
customFigma-specific tokens used to reproduce the shadcn/ui look
chartColors used for charts
sidebarColors specific to the sidebar component

Color variable usage guide

The meaning of each color is the same across kit versions. Apply these from the Mode collection. Swatches show shadcn/ui's default light theme, which the kit's default style matches.

SwatchColorUsage
primaryDefine the color palette used for your theme
primary-foregroundFor elements on top of primary
secondaryYour secondary brand color
secondary-foregroundFor elements on top of secondary
accentHighlight color for active or focused elements
accent-foregroundFor elements on top of accent
backgroundMain application background color
foregroundFor elements on top of background
cardBackground color for cards
card-foregroundFor elements on top of card
popoverBackground color for things like select menus
popover-foregroundFor elements on top of popover
mutedSubtle background for elements requiring less attention
muted-foregroundFor elements on top of muted
destructiveFor errors and destructive actions like delete
destructive-foregroundFor elements on top of destructive
borderMain border color
inputBorder color for form input elements
ringHelps define the focus indicator
custom/focusThe soft outer focus ring on focused elements like buttons
custom/destructive-focusThe soft outer focus ring on focused elements like destructive buttons
bg-input-30Used for the background of elements like input to increase contrast in dark mode. More info here
bg-input-50Used in the backgrounds of elements on hover like Combobox
bg-input-80Used for input element background like Switch

Tokens like custom/focus and bg-input-* are shadcncraft additions that reproduce shadcn/ui's look. They have no direct shadcn CSS token, so no swatch is shown.

Best practices

  • Apply Mode variables to elements. Never apply Style or Tailwind variables directly.
  • Theme by switching or editing the Style collection, not by editing individual component colors.
  • Reach for Tailwind primitives only for raw spacing, sizing and radius values.
  • Use variables instead of hard-coded values so designs stay aligned with shadcn/ui and translate cleanly to Tailwind CSS.
SBIOTJ

Join 9,000+ builders shipping with shadcncraft

Design and assemble full pages faster with production-ready blocks built for real products.
  • Production-ready blocks and components
  • Clean React and Tailwind parity
  • Built for SaaS, marketing, and ecommerce teams
Get the design system
Join Now CTA

Real support from the team behind shadcncraft

Get help within 24 hours from the people who build and maintain the system.
Email
Prefer a direct line? Send us a message and we'll get back to you as soon as possible.
Discord
Get quick support, share feedback, or connect with other builders.
Feedback
Got something to say about anything shadcncraft? We'd love to hear it.