Skip to main content

Designing a Design System with the shadcn/ui Button

About this guide​

This guide targets React 19 / Tailwind CSS v4 / the latest shadcn/ui. Using the shadcn/ui Button as the subject, you learn how to design reusable components aligned with a design system through design tokens, cva, the cn function, and Radix Slot, across 13 chapters.

By the time you finish this guide, you will be able to do the following.

Design reusable components yourself, following design system best practices (design tokens, declarative variants, safe customization, composition, type safety).

Who this guide is for​

  • You understand the basics of React (components, props, state)
  • You have used basic Tailwind CSS classes
  • You want to read and understand shadcn/ui code

Structure of the guide​

The learning path​

The guide is organized into four parts, progressing in order from the basics to practice.

PartThemeChaptersWhat you learn
FundamentalsIntroduction and basics4Introduction / environment setup / final form / Tailwind
Design SystemManaging color by meaning1Design tokens
Core TechniquesThe techniques behind the Button5cva / cn / ref / Slot / TypeScript
PracticeApply it hands-on3Hands-on practice / Going further / From a Button to a design system

Chapters​

Fundamentals​

Design System​

Core Techniques​

Practice​

Now, let's start with the Introduction.