Basic Usage
Variants
Buttons come in six semantic variants to communicate different action priorities.- Preview
- Code
The button renders with different visual styles based on the
variant prop:- primary - Main call-to-action (solid purple background)
- secondary - Secondary actions (outlined)
- ghost - Subtle actions (transparent with border on hover)
- danger - Destructive actions (solid red background)
- link - Navigation-style (text only, no border)
- text - Minimal actions (text only, subtle hover)
Sizes
Three size options for different contexts.With Icons
Buttons can display icons before or after the label text.States
Loading
Show a spinner during async operations:Disabled
Full Width
Make the button span the full width of its container:Common Patterns
Form Actions
Danger Confirmation
Icon-Only Actions
Props
Visual variant:
primary, secondary, ghost, danger, link, or textButton size:
small, middle, or largeShow loading spinner
Disable the button
Make button full width
Icon to display before the button text
Icon position:
start or endButton shape:
default, circle, or roundClick event handler