Open-source library, MIT licence
shadcn/ui
The plain, well-made building blocks most React sites now start from: buttons, forms, menus, dialogs, tables and charts. 64 components, each running live with its code to copy. The first one under each heading is free; the rest come with paid plans.
ui.shadcn.comThe MIT licenceSet up once
Set up once
Every shadcn/ui component needs Tailwind CSS and a small helper called cn in your project. One command sets up both. After that, each component is one more command, or a file you paste in.
npx shadcn@latest init
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
Forms
16A one-line text box for forms.
06Textarea With paid plansA text box for longer writing, several lines tall.
07Label With paid plansThe name above or beside a form field, tied to it for screen readers.
08Checkbox With paid plansA box you tick on or off.
09Radio group With paid plansA set of round options where only one can be picked.
10Switch With paid plansAn on and off switch for a setting.
11Slider With paid plansA handle you drag along a track to pick a number.
12Select With paid plansA button that opens a list of options to pick one from.
13Native select With paid plansThe browser's own select menu, styled to match the rest.
14Combobox With paid plansA text box that suggests matches from a list as you type.
15One-time code With paid plansSeparate boxes for a one-time code, with paste support.
16Input group With paid plansA text box with icons, buttons or text attached inside its edges.
17Field With paid plansA label, control and help text put together the same way every time.
18Form With paid plansA form wired to React Hook Form and Zod, with checks and error messages.
19Calendar With paid plansA month calendar to pick a date or a range of dates.
20Date picker With paid plansA button that opens a calendar in a popover to pick a date.
Overlays
7A window over the page for a short task, like editing a profile.
31Alert dialog With paid plansA window that asks for a yes or no before something can't be undone.
32Sheet With paid plansA panel that slides in from the edge of the screen.
33Drawer With paid plansA panel that slides up from the bottom, made for phones.
34Popover With paid plansA small box of content that opens next to a button.
35Hover card With paid plansA preview card that shows when you rest the pointer on a link.
36Tooltip With paid plansA short label that shows on hover or keyboard focus.
Feedback
5A box that draws attention to a message, in a normal or a warning style.
38Toast With paid plansSmall notices that slide in at the corner and leave on their own (Sonner).
39Progress With paid plansA bar that fills as a task gets done.
40Skeleton With paid plansGrey shapes that stand in for content while it loads.
41Spinner With paid plansA turning icon that says something is loading.
Layout and content
12A box with a header, content and footer: a sign-in form here.
43Accordion With paid plansStacked headings that each open to show their section.
44Collapsible With paid plansA panel that opens and closes under a button.
45Carousel With paid plansSlides you swipe or step through with arrows (Embla).
46Avatar With paid plansA round picture for a person, with their initials when there is no picture.
47Badge With paid plansA small rounded label for a status or a count.
48Item With paid plansA row with a title, a line of text and actions, for lists and settings.
49Empty state With paid plansWhat to show when there is nothing here yet, with a next step.
50Separator With paid plansA thin line between pieces of content.
51Aspect ratio With paid plansKeeps a box at a set shape, like 16 by 9, at any width.
52Scroll area With paid plansA box with its own neat scrollbar.
53Resizable panels With paid plansPanels you resize by dragging the line between them.
Tables and charts
3Text
3Chat
5One message in a chat, with an avatar, name and time.
61Bubble With paid plansA chat bubble, with styles for each side and room for reactions.
62Attachment With paid plansA file attached to a message, with its name, size and upload state.
63Marker With paid plansA status line or a labelled divider inside a conversation.
64Message scroller With paid plansA chat window that keeps the newest message in view as more arrive.