BUTTON
Interactive trigger element with four semantic variants. Supports asChild for polymorphic rendering via Radix Slot.
DEPS:@radix-ui/react-slotclass-variance-authority
PREVIEW
INSTALLATION
USAGE
VARIANTS
variant="EXEC"
variant="OUTLINE"
variant="GHOST"
variant="ABORT"
SIZES
AS CHILD
Use asChild to render button styles on any element (e.g. a link).
PROPS
| PROP | TYPE | DEFAULT | DESCRIPTION |
|---|---|---|---|
| variant | EXEC | OUTLINE | GHOST | ABORT | OUTLINE | Visual style and semantic meaning of the button. |
| size | SM | MD | LG | MD | Controls height and horizontal padding. |
| asChild | boolean | false | Merge button props onto the child element instead of rendering a <button>. |
| disabled | boolean | false | Disables the button and reduces opacity. |
| className | string | — | Additional Tailwind classes merged via cn(). |