Search documentation

Search docs pages and sections

Figma Kit
  • Getting started
  • Styles
  • Variables
  • Typeset
  • Theming
  • Components
  • Icons
  • Development
  • Updates
Registry
  • Pro Blocks
  • Templates
  • Themes
Plugin
  • Introduction
  • Generate code
  • Manage variables
  • Typeset
  • Select and install Pro Blocks
  • Security
Agent Skills
  • Agent Skills
  1. Documentation
  2. Variables

Menu

HomePreviewPricingRoadmapHelp & Contact

Products

Figma KitPro BlocksAgent SkillsNewFigma PluginTemplates

Resources

Free ThemesTheme GeneratorDocsAcademyBlogIcons

Legal

Licensing AgreementTerms & ConditionsPrivacy PolicyCookies

Components

AccordionAlertAlert DialogAspect RatioAttachmentAvatarBadgeBreadcrumbBubbleButtonButton GroupCalendarCardCarouselChartCheckboxCollapsibleComboboxCommandContext MenuData TableDate PickerDialogDrawerDropdown MenuEmptyFieldFormHover CardIcons - HugeIconsIcons - Lucide IconsIcons - Phosphor IconsIcons - Remix IconIcons - Tabler IconsInputInput GroupInput OTPItemKbdLabelMenubarMessageMessage ScrollerNavigation MenuPaginationPopoverProgressQuestionnaireRadio GroupResizableScroll-areaSelectSeparatorSheetSidebarSkeletonSliderSonnerSpinnerSwitchTableTabsTextareaToastToggleToggle GroupTooltipTypesetTypography

Landing Page Blocks

404 SectionsBannersBento GridsBlog SectionsCTA SectionsComparison SectionsContact SectionsEmpty LP SectionsFAQ SectionsFeature SectionsFootersGallery SectionsHeader SectionsHero SectionsLP NavbarsLanding Page ExamplesLogo SectionsPatternsPricing SectionsRich Text SectionsStats SectionsTeam SectionsTestimonials Sections

Application Blocks

App ShellsApplication ExamplesButtonsCardsDescription ListsEmpty SectionsNavbarsPage HeadersSection FootersSection HeadersSectionsSettingsSign inSign upTable Headers

E-commerce Blocks

CheckoutsExamplesIncentivesOrder Summary SectionsProduct Category SectionsProduct HeadersProduct List FiltersProduct List SectionsSale SectionsShopping CartsStore Navbars

This project is independent and not affiliated with Figma or shadcn/ui.
Copyright © 2026 Matt Wierzbicki

Variables

The shadcn/ui kit for Figma comes pre-configured with a comprehensive set of variables for colors, spacing, radius, typography, and widths. These variables ensure consistency and flexibility in your designs, and let a single file carry all 8 shadcn/ui styles.

The shadcn/ui kit for Figma comes pre-configured with a comprehensive set of variables for colors, spacing, radius, typography, and widths. These variables ensure consistency and flexibility in your designs.

Our UI kit leverages Figma variables and styles to mirror the official shadcn/ui framework, which is based on Tailwind CSS v4.

One file, 8 styles

The kit ships all 8 shadcn/ui styles in a single file — Nova, Vega, Mira, Luma, Sera, Maia, Rhea, and Lyra. Switching the active style restyles the entire file: heights, paddings, radius ramps, text sizes, shadows, focus rings, and border treatments all update at once. Four variable collections make that possible: Tailwind, Style, Mode, and Typeset.

Variable collections

The Basic version of the UI kit organizes variables into four collections that control different aspects of your design system. The Pro version (with Pro Blocks) adds a pro-blocks/* variable group inside the Style collection.

CollectionModesWhat it holds
TailwindValueTailwind CSS primitives: the raw color palette, spacing, radius, widths, opacity, line-height, and more.
StyleNova, Vega, Mira, Luma, Sera, Maia, Rhea, Lyra (8)Everything that differs per style: the light/dark color source, fonts, radius ramp, type scale, shadows, per-component structure values, and icon-library switches. Change the mode to restyle the whole file.
ModeLight, DarkThe shadcn/ui semantic tokens with their exact CSS names, plus alpha helpers and the semantic custom/* tokens. Use these directly in your designs.
Typeset14px, 15px, 16px, 18pxThe prose/markdown system that mirrors shadcn's typeset.css. See the Typeset documentation.

How the collections resolve

Colors flow through the collections in a one-way chain — each layer only ever points at the next:

  • Kit components bind component/* variables in the Style collection (component/input/bg, component/badge/text, …). This per-component layer is what lets one component diverge per style without touching any other.
  • component/* values alias Mode tokens (background, primary, custom/field, …). The Mode collection is a pure switch: Light points at the Style collection's color/light/* definitions, Dark at color/dark/*. No color values live in Mode itself.
  • The Style collection is the only place colors are defined. Each color/light/{token} + color/dark/{token} pair holds the value per style — usually an alias into the Tailwind palette, sometimes a raw value.

In your own designs, bind Mode tokens (including custom/*) — they carry the exact shadcn/ui CSS names, and the active Style mode plus the Light/Dark switch do the rest. In practice: bind a field surface to custom/field, and switching the frame's Style mode or Light/Dark mode recolors it correctly — no manual work.

1. Tailwind

The Tailwind collection contains standard Tailwind CSS colors and utility primitives. It has a single value mode and rarely needs editing directly — it's the palette everything else references.

Use Tailwind variables to:

  • Reference Tailwind colors from the Style collection's color pairs
  • Apply Tailwind colors directly to components
  • Control component spacing, widths, radius, and border width
  • Set opacity values
Variable GroupUsageExample
colors/{hue}/{shade}The standard Tailwind color palette (26 hues × 11 shades, plus black, white, and transparent)Elements using colors/blue/500 will use text-blue-500 or bg-blue-500 in code
spacing/*Apply to padding, margins, and gapsA component with spacing/4 in padding maps to the p-4 class in code
rounded/*Apply rounded corners — each step aliases the active style's radius/* ramp in the Style collectionAn element with rounded/lg maps to rounded-lg in code
border-width/*Set border thicknessAn element with border-width/2 maps to border-2 in code
min-width/*Set minimum width constraintsAn element with min-width/min-w-3xs maps to min-w-3xs in code
max-width/*Set maximum width constraintsAn element with max-width/max-w-3xl maps to max-w-3xl in code
opacity/*Control transparencyAn element with opacity/opacity-70 maps to opacity-70 in code
stroke-width/*Icon and vector stroke widthsUsed inside icon components
ring-width/*Focus-ring widthsReferenced by the Style focus-ring values
breakpoint/*Define breakpointsA frame with breakpoint/sm in max width defines styling for the sm:… prefix

2. Style

The Style collection is the heart of the kit. It has eight modes — one per shadcn/ui style — and holds everything that differs between them. Switch the mode on a page or frame (or set the file default) to restyle everything bound to it.

This is also where you recolor a theme: edit the color/light/* and color/dark/* pairs. See the theming documentation for the full workflow.

Variable GroupPurpose
color/light/{token} + color/dark/{token}The theme source — the only place colors are defined. Includes the shadcn semantic tokens, every custom/* definition, and the alpha/* ramp. Each pair feeds one Mode token; recolor your theme here rather than binding these to components directly.
font/family/{sans,serif,mono,heading}Typefaces for the whole file. Change once, applies everywhere.
radius/{xs…4xl}The per-style radius ramp (Sera and Lyra are square; Luma and Maia are round). Components reference it through the Tailwind collection's rounded/* aliases.
text/*The per-style type scale: size and default line-height per ramp step, plus computed lh-tight…lh-loose steps matching Tailwind's leading-* scale.
font-weight/{thin…black}The font-weight scale, referenced by text styles and per-component weight values.
container/* + breakpoint/*Container widths (3xs–7xl) and responsive breakpoints matching Tailwind's scale.
shadow/*, inset-shadow/*, drop-shadow/*, blur/*Effect primitives and per-component shadow slots, referenced by the kit's effect styles (along with focus-ring/width).
component/{name}/*Structural values (heights, paddings, gaps, radii, border widths) and per-component color bindings that alias Mode tokens — the layer the kit's components are actually bound to.
icon-library/{lucide,huge,phosphor,tabler,remix}Boolean switches for the active icon set — set exactly one to true. See the icons documentation.
pro-blocks/{desktop,mobile}/*Layout values for the Landing Page Pro Blocks (Pro version only).
meta/style-nameThe name of the active style, for reference.
meta/versionA hidden marker identifying the kit version. It powers the plugin's auto-detection — never edit it.

Pro Blocks variables (Pro version)

The pro-blocks/* group inside the Style collection provides the layout and typography values used by the Landing Page Pro Blocks. Variables are split into pro-blocks/desktop/* and pro-blocks/mobile/* so you can define distinct values per breakpoint, and you can use them as a foundation for your own section styles.

VariableDescription
container-padding-xX-axis padding for Pro Block containers (desktop and mobile)
section-padding-yY-axis padding for Pro Block sections (desktop and mobile)
section-title-gap-{sm,md,lg,xl}Y-axis gap for section-title wrappers, one per heading size (desktop)
heading-{sm,md,lg,xl}/*Typography for the Pro Blocks heading styles: font-size, line-height, letter-spacing, and font-weight per heading size (desktop and mobile)

3. Mode

The Mode collection holds the shadcn/ui semantic color tokens that switch between light and dark. Use these directly in your UI designs and components. They carry the exact CSS variable names from shadcn/ui, so the mapping to code is one-to-one. The collection holds no color values of its own — every token aliases its color/light/* or color/dark/* definition in the Style collection, making Mode a pure light/dark switch.

Use alpha variables for fills and strokes that need transparency.

Variable GroupUsageExample
Semantic tokensFlat shadcn/ui color variablesA frame with the background variable maps to bg-background in code
alpha/*Transparent overlay steps: alpha/5, 10, 20, 30, 40, 50, 60, 80, 90A fill using muted plus alpha/90 maps to bg-muted/90 in code
custom/*Semantic helper tokens for states and surfaces shadcn builds with utility combinations (see below)A field surface using custom/field maps to the recipe in its variable description

Semantic color tokens

Each semantic token has a specific purpose in shadcn/ui:

VariablePurpose
backgroundMain application background
foregroundPrimary text color on the background
cardCard component background
card-foregroundText and icons within cards
popoverBackground for dropdown menus and popovers
popover-foregroundText and icons within popovers
primaryBrand color for primary actions (buttons, highlights)
primary-foregroundText and icons on primary-colored elements
secondaryLess prominent action color
secondary-foregroundText and icons on secondary-colored elements
mutedSubdued background for less important elements
muted-foregroundDe-emphasized text (captions, labels)
accentHighlight color for active or focused elements
accent-foregroundText and icons on accent-colored elements
destructiveError and deletion action color
borderDefault border color
inputForm input and button borders
ringFocus indicator color
ring-offsetFocus ring offset color (matches the surface the ring sits on)
chart-1 through chart-5Data visualization colors
sidebarSidebar background
sidebar-foregroundText and icons within the sidebar
sidebar-primaryPrimary actions within the sidebar
sidebar-primary-foregroundText on sidebar primary elements
sidebar-accentHighlighted elements within the sidebar
sidebar-accent-foregroundText on sidebar accent elements
sidebar-borderSidebar divider lines or borders
sidebar-ringFocus indicators within the sidebar

Semantic custom tokens

shadcn/ui builds many states and surfaces out of utility combinations rather than single tokens — for example a disabled field is disabled:bg-input/50 dark:disabled:bg-input/80. The kit captures those combinations as semantic custom/* tokens so you can bind one variable and get the correct value in every style and both modes. The recipes below show the Nova defaults — where a style diverges (for example Sera's transparent fields), the per-style recipe is in the variable's description in Figma.

TokenPurposeCode recipe
custom/fieldInput, textarea, and select surfacedark:bg-input/30
custom/controlOutline button and bordered trigger surfacebg-background dark:bg-input/30
custom/control-hoverOutline button/trigger hover surfacehover:bg-muted dark:hover:bg-input/50
custom/field-borderResting field borderborder-input
custom/field-disabledDisabled field washdisabled:bg-input/50 dark:disabled:bg-input/80
custom/switch-trackSwitch unchecked trackdata-unchecked:bg-input dark:data-unchecked:bg-input/80
custom/muted-hoverGhost button hoverhover:bg-muted dark:hover:bg-muted/50
custom/muted-subtleSubtle muted wash (card footer, table row hover)bg-muted/50
custom/selected-washSelected/checked row backgroundhas-data-checked:bg-primary/5 dark:has-data-checked:bg-primary/10
custom/primary-mutedSubtle primary tint (selected rows, kbd)bg-primary/5 dark:bg-white/10
custom/primary-borderChecked-control border (switch, checkbox)border-primary/30 dark:border-primary/20
custom/destructive-mutedTinted destructive button/badge backgroundbg-destructive/10 dark:bg-destructive/20
custom/destructive-muted-hoverHover for tinted destructive elementshover:bg-destructive/20 dark:hover:bg-destructive/30
custom/destructive-muted-foregroundSecondary destructive texttext-destructive/90
custom/destructive-borderInvalid/destructive field borderaria-invalid:border-destructive dark:aria-invalid:border-destructive/50
custom/destructive-ringInvalid focus ringaria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40
custom/focus-ringFocus halo color (alpha varies per style)ring-ring/50
custom/menu-borderHairline border on menus, cards, popoversring-1 ring-foreground/10
custom/menu-glassFrosted menu backgroundbg-popover/70 backdrop-blur-2xl
custom/warning-foregroundWarning text (amber — no shadcn warning token exists)Amber foreground
custom/warning-backgroundWarning surfaceAmber background
custom/warning-borderWarning borderAmber border

The kit ships 60 custom/* tokens in total. Beyond the ones listed above, they cover component details — hovers (primary-hover, secondary-hover, tinted-hover, bubble-outline-hover, bubble-ghost-hover, badge-text-hover-muted), controls and menus (control-border, control-strong, control-wash, menu-border-subtle, menu-border-faint, menu-separator), rings (ring-faint, focus-ring-soft, ring-chart, ring-chart-strong), washes and overlays (overlay, kbd-overlay, foreground-wash, muted-foreground-wash, border-soft, tinted, selected-wash), per-component tokens (accordion-active-bg, active-tab-border, calendar-surface, calendar-accent, slider-thumb, toggle-group-shadow, track-strong, drawer-border, and the switch family), and extra destructive variants (destructive-strong, destructive-wash, destructive-border-soft, destructive-border-strong). Each carries its exact utility recipe in its Figma description.

4. Typeset

The Typeset collection powers the prose/markdown system and has four size modes (14px, 15px, 16px, 18px). It's covered in full in the Typeset documentation.

Best practices

  • Maintain consistency by using variables rather than hard-coded values.
  • Use Mode tokens (including custom/*) for anything that should adapt to light/dark and to the active style.
  • Recolor themes in the Style collection's color/light/* and color/dark/* pairs, not on individual components.
  • Colors are defined once, in the Style collection's color pairs. Never enter raw color values in the Mode collection or in component/* variables — alias down the chain instead.
  • When extending the kit, follow the chain: define the color in the Style collection (color/light/* + color/dark/*), expose it as a Mode token, and bind components to a component/* variable that aliases it.
  • Reference the right collection for the job:
    • Tailwind for the raw palette and utility primitives
    • Style for per-style structure, fonts, radius, and the theme color source
    • Mode for theme-aware component colors
    • Typeset for prose and long-form text

By following these guidelines, your designs will translate cleanly to shadcn/ui and Tailwind CSS.

Limitations and differences compared to Tailwind CSS

While we've made every effort to translate the Tailwind CSS system into Figma variables, there are inherent limitations in the current Figma implementation. Understanding these differences will help you work more effectively with our UI kit.

Math equations

Tailwind CSS: Uses a spacing variable as a base unit for calculations. For example, p-4 equals (--spacing) * 4 = 16px.

Figma: Math operations are not yet supported in Figma variables. As a result, all spacing and size values in our UI kit are implemented as fixed pixel values rather than calculated ones.

Color spaces

Tailwind CSS v4: Uses the OKLCH color space for improved color perception and manipulation.

Figma: OKLCH is not yet supported in Figma. Our UI kit uses hex values instead to maintain compatibility while still providing a comprehensive color system. (When you export with our plugin you can still choose OKLCH, HSL, or RGB output — see the plugin documentation.)

Typography variables

Tailwind CSS: Offers leading (line-height) and tracking (letter-spacing) variables with percentage and em-based values.

Figma: Percentage values are not currently supported in Figma variables, so the kit pre-computes line-heights to pixels: each type step in the Style collection carries its default line-height (text/{step}/lh) plus lh-tight…lh-loose steps matching Tailwind's leading-* scale, already multiplied out per style. Text styles bind these pixel values. Letter-spacing (tracking) remains handled inside text styles.

Working with these limitations

Despite these constraints, our UI kit provides a robust design system that closely mirrors Tailwind CSS. When designing:

  • Use the predefined spacing variables even though they're fixed values.
  • Apply color variables consistently, knowing they'll translate correctly to code.
  • Use text styles for typography rather than trying to recreate Tailwind's typography variables directly.

These workarounds ensure your designs translate smoothly to code, even with the current limitations of Figma variables.