Button

Installation

$npx shadcn-macos@latest add button

Examples

Props

<Button />
PropTypeDefaultDescription
variant"default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "accent""default"Visual appearance style of the button.
size"default" | "sm" | "xs" | "lg" | "icon""default"Size dimensions and padding scaling of the button.
disabledbooleanfalseWhether the button is non-interactive and visually dimmed.
onClick(event: React.MouseEvent<HTMLButtonElement>) => void—Callback triggered when the button is clicked.
classNamestring—Additional Tailwind CSS classes to merge into the button.