The button component is used to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.
Usage
Default Button
Variants
Buttons come in different styles to convey different meanings.
Button Variants
Sizes
Choose from different sizes for various contexts.
Button Sizes
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
variant | default, secondary, destructive, outline, ghost, link | default | The visual style of the button. |
size | default, sm, lg, icon | default | The size of the button. |
asChild | boolean | false | Whether to render the button as its child component. |