🥳 New: shadcn/ui v4 support with Radix UI and Base UI components, blocks, and a theme generator aligned with Shadcn presets.

Visit changelog
shadcn/studio
Stars0

Search...

Search for docs, blocks, components, and more.

Variables

Variables store single, reusable values - such as a color, a number, or a string. They are great for handling theming, such as light and dark modes, and can be applied to other variables and styles. In the Shadcn/Studio kit, variables are the foundation of the entire design system. The kit organizes all variables into four collections. Each collection serves a specific purpose in the design system.

Read Figma's guide to variables

Variable Collection

The kit organises all variables into four collections. Each collection serves a specific purpose in the design system.

Mode Variables

mode variables collection in figma

Mode Variables are the core color layer of the kit. They contain all the semantic color variables from shadcn/ui and are set up with two modes Light and Dark so every component automatically picks up the correct value based on which mode is active.

These are not raw color values. They are semantic Variables - named by their role in the UI rather than their actual color. This means if you change a theme, the entire system updates without manually touching individual components.

The Variable groups are organised into the following groups:

GroupDescription
ThemeCore semantic color variables - primary, secondary, destructive, and more. These are the main Variables applied across all components.
OpacitySemi-transparent versions of core Variables. Used for overlays, hover states, and layered UI elements.
Font FamilyThe primary font family variable which is used across all text styles in the kit.
Border RadiusThe base radius Variable and its derived scale - sm, md, lg, xl, and more.
ShadowColor values used in shadow effects. Kept as variables so shadows respond correctly in both light and dark mode.
CustomCustom colors are created to give more shadcn specific design. These are the colors that shadcn gave in new updates and can be used as an extension for your brand specific colors.
TypographyFont size variable which is used across the UI kit.

Some of Color Variable Reference:

VariableRole
background / foregroundPage background and primary text color
primary / primary-foregroundMain action color and text on primary surfaces
secondary / secondary-foregroundSupporting color and text on secondary surfaces
muted / muted-foregroundSubtle backgrounds and de-emphasized text
accent / accent-foregroundHover states and highlighted elements
destructiveError and destructive action states
borderDefault border color
inputInput field border color
ringFocus ring color
card / card-foregroundCard surface and text
popover / popover-foregroundPopover surface and text

Tailwind Variables

shadcn/ui is built on top of Tailwind CSS, and the Shadcn/Studio kit reflects that at the variable level. Tailwind Variables provide the base layer of the design system - the raw, foundational values that semantic variables are built on top of.

The collection is organised into the following groups:

GroupDescription
ColorsThe full Tailwind color palette - base, slate, gray, and all other color scales. These are primitive values referenced by Mode and Theme Variables.
BreakpointsScreen breakpoint values used by the Responsive Variables collection.
SpacingThe complete Tailwind spacing scale used for padding, margins, and gaps across all components.
HeightFixed height values following the Tailwind scale.
WidthFixed width values following the Tailwind scale.
Min WidthMinimum width constraint values.
Max WidthMaximum width constraint values used for layout containers and content areas.
BordersBorder width values used across components.
TypographyFont size, line height, and letter spacing values from the Tailwind type scale.
OpacityOpacity scale values used for transparency across the system.

Responsive Variables

Responsive Variables are designed specifically for block-level responsiveness. Instead of creating custom values for every screen size manually, these variables let you define a single value that adapts across breakpoints automatically.

They are especially useful when working with the pre-built blocks in the kit, where layouts need to behave correctly across desktop, tablet, and mobile without duplicating frames.

Themes Variables

theme variables collection in figma

Theme Variables hold the design variables that define how each theme looks. Every pre-built theme in the kit is built using this collection, which makes it possible to switch themes by changing a variable mode rather than redesigning anything.

The collection is structured simply enough that you can create your own custom theme by adding a new mode column and mapping your values to the existing variables.

The collection is organised into the following groups:

GroupDescription
ThemeCore semantic color variables for each theme - background, foreground, card, popover, and others with their dark mode counterparts.
OpacitySemi-transparent color values per theme, used for overlays and layered UI elements.
Font FamilyFont family variables per theme - includes separate variables for sans, serif, and mono.
Border RadiusBase radius variable and its full scale per theme, controlling the overall shape feel of the design.
CustomAdditional color slots available for theme-specific extensions beyond the standard variable set.
TypographyFont size, weight, line height, and letter spacing variables per theme.
ShadowElevation and shadow values per theme - the largest group, covering all shadow levels across components.

The kit comes with 7 pre-built themes including Default, Marvel, Ghibli Studio, Clean Slate, and more - each available in light and dark mode. We recommend using only 2–3 themes in your project and removing the rest to keep your file lightweight.


    Pro Docs - Variables in Figma - Shadcn Studio