DESIGN.md · Analysis

shadcn.io

shadcn.io · 26 Jul 2026 · 47 colors · GeistSans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif

shadcn.io

The AI-Native shadcn/ui Component Library for React. A production-ready design system for developers building with AI-assisted React and Tailwind CSS.

Colors

surface#ffffff
surface-dim#f5f5f5
surface-bright#ffffff
surface-container-lowest#fafafa
surface-container-low#f5f5f5
surface-container#f0f0f0
surface-container-high#e5e5e5
surface-container-highest#d1d5db
on-surface#262529
on-surface-variant#666666
inverse-surface#1a1a1a
inverse-on-surface#ffffff
outline#999999
outline-variant#cccccc
surface-tint#262529
primary#262529
on-primary#ffffff
primary-container#f2f2f3
on-primary-container#262529
inverse-primary#ffffff
secondary#ff5f56
on-secondary#ffffff
secondary-container#ffe8e6
on-secondary-container#ff5f56
tertiary#ffbd2e
on-tertiary#262529
tertiary-container#fff8e6
on-tertiary-container#ffbd2e
error#ef4444
on-error#ffffff
error-container#fee2e2
on-error-container#ef4444
primary-fixed#f2f2f3
primary-fixed-dim#e5e5e5
on-primary-fixed#262529
on-primary-fixed-variant#666666
secondary-fixed#ffe8e6
secondary-fixed-dim#ffd4cf
on-secondary-fixed#ff5f56
on-secondary-fixed-variant#cc4a42
tertiary-fixed#fff8e6
tertiary-fixed-dim#ffe8b3
on-tertiary-fixed#ffbd2e
on-tertiary-fixed-variant#cc9623
background#ffffff
on-background#262529
surface-variant#f2f2f3

Typography

display
fontFamily: GeistSans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif · fontSize: 60px · fontWeight: 700 · lineHeight: 68px · letterSpacing: -0.04em
headline-lg
fontFamily: GeistSans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif · fontSize: 40px · fontWeight: 600 · lineHeight: 48px · letterSpacing: -0.02em
headline-md
fontFamily: GeistSans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif · fontSize: 28px · fontWeight: 600 · lineHeight: 36px · letterSpacing: -0.01em
title-lg
fontFamily: GeistSans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif · fontSize: 20px · fontWeight: 600 · lineHeight: 28px
body-lg
fontFamily: GeistSans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif · fontSize: 18px · fontWeight: 400 · lineHeight: 28px
body-md
fontFamily: GeistSans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif · fontSize: 16px · fontWeight: 400 · lineHeight: 24px
label-md
fontFamily: GeistSans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif · fontSize: 14px · fontWeight: 600 · lineHeight: 20px · letterSpacing: 0.01em
label-sm
fontFamily: GeistSans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif · fontSize: 12px · fontWeight: 500 · lineHeight: 16px

Design guidance

Overview

shadcn.io is a developer-first component library and template marketplace built for AI-assisted React development. The brand embodies "Functional Minimalism"—a design philosophy that prioritizes clarity, precision, and developer ergonomics over decorative flourishes. The interface uses a high-contrast monochromatic palette (near-black #262529 on pure white #ffffff) with strategic accent colors (red #ff5f56, amber #ffbd2e, green #27c93f) reserved for status indicators and call-to-action elements. This aesthetic evokes the precision of code editors and terminal interfaces, creating a sense of technical authenticity and trustworthiness. The emotional response is one of confidence and efficiency: users feel they are working with a mature, production-grade tool.

The brand voice is direct, technical, and unpretentious. Vocabulary favors concrete nouns ("blocks," "components," "templates") over abstract marketing language. Tone is conversational but authoritative—never breathless or hyperbolic. Example sentence in brand voice: "Get 6,000+ production-ready blocks. Copy, paste, ship." The design system prioritizes developer velocity: every interaction is optimized for speed, every visual hierarchy is unambiguous, and every component is immediately recognizable.

Colors

The color system is anchored in a high-contrast, accessibility-first approach. Primary (#262529) is the near-black used for body text, buttons, and primary interactive elements—it is the signature brand color because it appears on every CTA and represents the brand's technical, no-nonsense identity. On-primary (#ffffff) provides maximum contrast for legibility at 16px body text and 14px labels. The surface stack (white #ffffff through gray #d1d5db) creates visual separation without introducing color noise: surface-container-high (#e5e5e5) is used for hover states on cards and list items, while surface-container-lowest (#fafafa) provides subtle background differentiation for nested sections. Secondary (#ff5f56, a vivid red) is reserved for error states, destructive actions, and high-priorit

Typography

The type system uses a single typeface family (GeistSans) across all scales to reinforce brand cohesion and reduce cognitive load. Display (60px, 700 weight, -0.04em letter-spacing) is reserved for hero headlines and major section breaks; headline-lg (40px, 600 weight, -0.02em) for secondary headings and card titles; headline-md (28px, 600 weight, -0.01em) for subsection headers. Body text uses two weights: body-lg (18px, 400 weight, 28px line-height) for introductory copy and body-md (16px, 400 weight, 24px line-height) for standard paragraph text and UI labels. Label-md (14px, 600 weight, 20px line-height, 0.01em letter-spacing) is applied to button text, form labels, and badge text; label-sm (12px, 500 weight, 16px line-height) for secondary metadata and helper text. All headlines use n

Layout

The page layout uses a 12-column grid with a max-width of 1280px (container-max-width: 1280px) to accommodate both desktop and tablet viewports. The gutter width is 24px (spacing.md), applied consistently between grid columns and as the outer margin on all major sections. White-space is used aggressively: section separation uses lg spacing (40px) to create visual breathing room, while component-level padding uses md spacing (24px) for cards and containers. The hero section spans the full width with a subtle background gradient (light gray #f5f5f5 to white #ffffff) to differentiate it from the body. Content sections are left-aligned with a max-width of 1100px to maintain optimal line length (50–75 characters) for body text. The spacing scale (xs: 4px, sm: 12px, md: 24px, lg: 40px, xl: 64px)

Elevation & Depth

Depth in this design system is achieved through subtle shadow layering and border definition rather than color shifts. Level 1 (Base/Surface) has no shadow—elements sit flush on the white background. Level 2 (Standard Cards) uses elevation.sm (0 1px 2px rgba(0, 0, 0, 0.06)) with a 1px solid border in outline-variant (#cccccc) to define the card boundary without visual heaviness. Level 3 (Elevated/Hover States) applies elevation.md (0 4px 12px rgba(0, 0, 0, 0.08)) with the same border to create a subtle lift effect on interaction. Interactive elements (buttons, inputs) use no shadow in their de

Shapes

The shape philosophy is "Technical Precision"—rounded corners are used sparingly and consistently to signal interactivity without introducing organic softness. Buttons use rounded.lg (1rem / 16px) to create a distinct, clickable appearance that contrasts with the sharp edges of input fields. Input fields and search boxes use rounded.DEFAULT (0.5rem / 8px) to maintain a utilitarian, form-like quality. Cards use rounded.xl (1.5rem / 24px) to create visual softness at the container level while keeping internal elements sharp. Badges and small UI elements use rounded.full (9999px) to create pill-s

Components

Action Elements Buttons are the primary interactive element and use a two-state system: button-primary (background: #262529, color: #ffffff, padding: 12px 24px, height: 44px, rounded: 1rem, font-weight: 600) for primary actions like "Get Started" and "Sign In"; button-secondary (background: transparent, border: 1px solid #999999, color: #262529, padding: 12px 24px, height: 44px, rounded: 1rem, font-weight: 600) for secondary actions like "Learn More" or "Browse". Both states transition to their hover variants (button-primary-hover: background #1a1a1a; button-secondary-hover: background #e5e5e5) with a 150ms ease-in-out timing function. Focus states add a 3px outline in rgba(38, 37, 41, 0.1) for keyboard accessibility. Disabled buttons reduce opacity to 0.5 and set cursor: not-allowed.

Do's and Don'ts

**Do**

  • Do use the primary color (#262529) for all primary CTAs and interactive elements—it is the brand's signature and should appear prominently on every page.
  • Do maintain high contrast between text and background: body text on white must be #262529 or darker, and white text on dark backgrounds must use #ffffff.
  • Do apply consistent padding using the spacing scale (sm: 12px, md: 24px, lg: 40px) to create a predictable, grid-based rhythm across all components.
  • Do use negative letter-spacing (-0.04em to -0.01em) on all headlines to convey precision and technical sophistication.
  • Do reserve accent colors (red #ff5f56, amber #ffbd2e, green #27c93f) for status indicators and high-priority alerts—use them sparingly to maintain visual focus.

**Don't**

  • Don't use rounded corners smaller than 0.5rem (8px) on interactive elements—this creates visual ambiguity between rounded and sharp edges.
  • Don't apply shadows larger than elevation.lg (0 16px 40px rgba(0, 0, 0, 0.12)) to standard components—this breaks the minimal aesthetic and creates visual noise.
  • Don't use more than two accent colors in a single view—the high-contrast monochromatic palette is the brand's defining characteristic.
  • Don't set font-weight below 400 for body text or below 500 for labels—GeistSans requires sufficient weight to maintain legibility at small sizes.
  • Don't apply color transitions longer than 200ms on hover states—the brand prioritizes responsiveness and developer velocity, and slow interactions feel sluggish.