Button

Displays a button or a component that looks like a button.

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

PropTypeDefaultDescription
variantdefault, secondary, destructive, outline, ghost, linkdefaultThe visual style of the button.
sizedefault, sm, lg, icondefaultThe size of the button.
asChildbooleanfalseWhether to render the button as its child component.