Skip to main content
New: Deck Doctor. Upload your deck, get CPO-level feedback. 7-day free trial.
Free Resource

shadcn/ui Component Reference

Complete reference for all shadcn/ui components with install commands, usage code, props, and live-styled previews. Copy and paste into your Next.js project.

1

Search or filter by category

2

Copy the install command

3

View docs and usage examples

32
Components
6
Categories
32
Showing

Accordion

Layout

A vertically stacked set of interactive headings that each reveal a section of content.

View Docs
Yes. It adheres to the WAI-ARIA design pattern.
Install
npx shadcn@latest add accordion
Key Props
PropTypeDefault
type"single" | "multiple""single"
collapsiblebooleanfalse
defaultValuestring | string[]undefined
disabledbooleanfalse

Aspect Ratio

Layout

Displays content within a desired ratio. Useful for images and video embeds.

View Docs
16:9
Install
npx shadcn@latest add aspect-ratio
Key Props
PropTypeDefault
rationumber1
asChildbooleanfalse

Card

Layout

A container for grouping related content and actions with header, content, and footer sections.

View Docs

Card Title

Card Description

Card Content

Card Footer

Install
npx shadcn@latest add card
Key Props
PropTypeDefault
classNamestring""
childrenReactNodeundefined

Collapsible

Layout

An interactive component which expands and collapses a panel of content.

View Docs
@peduarte starred 3 repositories
@radix-ui/primitives
Install
npx shadcn@latest add collapsible
Key Props
PropTypeDefault
openbooleanundefined
onOpenChange(open: boolean) => voidundefined
defaultOpenbooleanfalse
disabledbooleanfalse

Separator

Layout

A visual divider that separates content into distinct sections.

View Docs

Radix Primitives

An open-source UI component library.

Install
npx shadcn@latest add separator
Key Props
PropTypeDefault
orientation"horizontal" | "vertical""horizontal"
decorativebooleantrue
classNamestring""

Button

Forms

Displays a button or a component that looks like a button. Supports multiple variants and sizes.

View Docs
Install
npx shadcn@latest add button
Key Props
PropTypeDefault
variant"default" | "destructive" | "outline" | "secondary" | "ghost" | "link""default"
size"default" | "sm" | "lg" | "icon""default"
asChildbooleanfalse
disabledbooleanfalse

Checkbox

Forms

A control that allows the user to toggle between checked and not checked states.

View Docs
Accept terms and conditions
Install
npx shadcn@latest add checkbox
Key Props
PropTypeDefault
checkedboolean | "indeterminate"undefined
onCheckedChange(checked: boolean) => voidundefined
disabledbooleanfalse
requiredbooleanfalse

Input

Forms

Displays a form input field. Supports all standard HTML input attributes.

View Docs
you@example.com
Install
npx shadcn@latest add input
Key Props
PropTypeDefault
typestring"text"
placeholderstring""
disabledbooleanfalse
classNamestring""

Label

Forms

Renders an accessible label associated with form controls.

View Docs
you@example.com
Install
npx shadcn@latest add label
Key Props
PropTypeDefault
htmlForstringundefined
classNamestring""

Radio Group

Forms

A set of checkable buttons where only one can be checked at a time.

View Docs
Option One
Option Two
Install
npx shadcn@latest add radio-group
Key Props
PropTypeDefault
defaultValuestringundefined
valuestringundefined
onValueChange(value: string) => voidundefined
disabledbooleanfalse

Select

Forms

Displays a list of options for the user to pick from, triggered by a button.

View Docs
Select a theme
Install
npx shadcn@latest add select
Key Props
PropTypeDefault
defaultValuestringundefined
valuestringundefined
onValueChange(value: string) => voidundefined
disabledbooleanfalse

Switch

Forms

A toggle control that allows the user to switch between on and off states.

View Docs
Airplane Mode
Install
npx shadcn@latest add switch
Key Props
PropTypeDefault
checkedbooleanundefined
onCheckedChange(checked: boolean) => voidundefined
disabledbooleanfalse
requiredbooleanfalse

Textarea

Forms

Displays a multi-line text input field for longer form content.

View Docs
Type your message here.
Install
npx shadcn@latest add textarea
Key Props
PropTypeDefault
placeholderstring""
disabledbooleanfalse
rowsnumberundefined
classNamestring""

Avatar

Data Display

An image element with a fallback for representing the user. Supports initials fallback.

View Docs
CN
JD
Install
npx shadcn@latest add avatar
Key Props
PropTypeDefault
srcstringundefined
altstring""
classNamestring""

Badge

Data Display

Displays a badge or a component that looks like a badge. Used for status indicators and labels.

View Docs
DefaultSecondaryOutlineDestructive
Install
npx shadcn@latest add badge
Key Props
PropTypeDefault
variant"default" | "secondary" | "outline" | "destructive""default"
classNamestring""

Calendar

Data Display

A date field component that allows users to enter and edit date values. Built on react-day-picker.

View Docs
March 2026
Su
Mo
Tu
We
Th
Fr
Sa
15
16
17
18
19
20
21
Install
npx shadcn@latest add calendar
Key Props
PropTypeDefault
mode"single" | "multiple" | "range""single"
selectedDate | undefinedundefined
onSelect(date: Date) => voidundefined
disabledMatcher | Matcher[]undefined

Table

Data Display

A responsive table component for displaying rows of data with headers and footers.

View Docs
InvoiceStatusAmount
INV001Paid$250.00
INV002Pending$150.00
Install
npx shadcn@latest add table
Key Props
PropTypeDefault
classNamestring""
childrenReactNodeundefined

Tabs

Data Display

A set of layered sections of content displayed one at a time, triggered by tab buttons.

View Docs

Account settings here.

Install
npx shadcn@latest add tabs
Key Props
PropTypeDefault
defaultValuestringundefined
valuestringundefined
onValueChange(value: string) => voidundefined
orientation"horizontal" | "vertical""horizontal"

Tooltip

Data Display

A popup that displays information related to an element when the element receives focus or hover.

View Docs
Add to library
Hover me
Install
npx shadcn@latest add tooltip
Key Props
PropTypeDefault
delayDurationnumber700
skipDelayDurationnumber300
side"top" | "right" | "bottom" | "left""top"
align"start" | "center" | "end""center"

Alert

Feedback

Displays a callout for important information. Supports default and destructive variants.

View Docs
$
Heads up!

You can add components using the CLI.

Install
npx shadcn@latest add alert
Key Props
PropTypeDefault
variant"default" | "destructive""default"
classNamestring""

Alert Dialog

Feedback

A modal dialog that interrupts the user with important content and expects a response.

View Docs

Are you absolutely sure?

This action cannot be undone.

Install
npx shadcn@latest add alert-dialog
Key Props
PropTypeDefault
openbooleanundefined
onOpenChange(open: boolean) => voidundefined
defaultOpenbooleanfalse

Progress

Feedback

Displays an indicator showing the completion progress of a task with an animated bar.

View Docs
Install
npx shadcn@latest add progress
Key Props
PropTypeDefault
valuenumber0
maxnumber100
classNamestring""

Toast

Feedback

A succinct message that is displayed temporarily. Supports actions and multiple variants.

View Docs

Scheduled: Catch up

Friday, February 10, 2024

Install
npx shadcn@latest add toast
Key Props
PropTypeDefault
titlestringundefined
descriptionstringundefined
variant"default" | "destructive""default"
durationnumber5000

Dialog

Overlay

A window overlaid on the primary content. Renders content in a portal above the page.

View Docs

Edit profile

Make changes to your profile here.

Pedro Duarte
@peduarte
Install
npx shadcn@latest add dialog
Key Props
PropTypeDefault
openbooleanundefined
onOpenChange(open: boolean) => voidundefined
defaultOpenbooleanfalse
modalbooleantrue

Dropdown Menu

Overlay

A menu of actions or options triggered by a button. Supports sub-menus and keyboard navigation.

View Docs
My Account
Profile
Billing
Settings
Install
npx shadcn@latest add dropdown-menu
Key Props
PropTypeDefault
openbooleanundefined
onOpenChange(open: boolean) => voidundefined
defaultOpenbooleanfalse
modalbooleantrue

Hover Card

Overlay

For sighted users to preview content available behind a link. Opens on hover.

View Docs
@nextjs

Next.js

The React Framework for the Web. Used by major companies worldwide.

Install
npx shadcn@latest add hover-card
Key Props
PropTypeDefault
openDelaynumber700
closeDelaynumber300
openbooleanundefined
onOpenChange(open: boolean) => voidundefined

Popover

Overlay

Displays rich content in a portal, triggered by a button. Useful for forms and pickers.

View Docs

Place content for the popover here.

Install
npx shadcn@latest add popover
Key Props
PropTypeDefault
openbooleanundefined
onOpenChange(open: boolean) => voidundefined
defaultOpenbooleanfalse
modalbooleanfalse

Sheet

Overlay

A panel that slides in from the edge of the screen. Useful for mobile navigation and forms.

View Docs
Page content

Edit profile

Make changes here.

Install
npx shadcn@latest add sheet
Key Props
PropTypeDefault
side"top" | "right" | "bottom" | "left""right"
openbooleanundefined
onOpenChange(open: boolean) => voidundefined
defaultOpenbooleanfalse

Breadcrumb

Navigation

Displays the path to the current resource using a hierarchy of links.

View Docs
Install
npx shadcn@latest add breadcrumb
Key Props
PropTypeDefault
separatorReactNode"/"
classNamestring""

Command

Navigation

A command palette component. Searchable list of actions, similar to macOS Spotlight.

View Docs
Type a command...
Suggestions
Calendar
Search
Settings
Install
npx shadcn@latest add command
Key Props
PropTypeDefault
filter(value: string, search: string) => numberundefined
shouldFilterbooleantrue
loopbooleanfalse
classNamestring""

Navigation Menu

Navigation

A collection of links for navigating websites. Supports dropdown sub-menus and indicators.

View Docs
Install
npx shadcn@latest add navigation-menu
Key Props
PropTypeDefault
valuestringundefined
onValueChange(value: string) => voidundefined
delayDurationnumber200
orientation"horizontal" | "vertical""horizontal"

Pagination

Navigation

Navigation for paged content. Supports previous, next, and numbered page links.

View Docs
Install
npx shadcn@latest add pagination
Key Props
PropTypeDefault
isActivebooleanfalse
size"default" | "sm" | "lg" | "icon""icon"
classNamestring""
Free PDF

Get the PM Toolkit Cheat Sheet

50 tools and 880+ resources mapped across 6 categories. A 2-page PDF you'll actually use.

or use email

Instant PDF download. One email per week after that.

Want full SaaS idea playbooks with market research?

Explore Ideas Pro →