Button
A chunky pressable block. It lifts on hover and sinks into its own wall when pressed.
Installation
Usage
Examples
States
Rest, hover, pressed, keyboard focus and disabled. Disabled turns flat and dashed, so it reads without colour.
Rest
Hover
Pressed
Focus
Disabled
Sizes
With a glyph
Loading
loading shows a spinner, sets aria-busy and blocks clicks.
API
Everything else is passed through to the underlying element or Radix primitive.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "secondary" | "success" | "reward" | "outline" | "ghost" | "destructive" | "default" | Face and wall colours, from the active palette. |
size | "default" | "sm" | "lg" | "icon" | "icon-sm" | "default" | Every size keeps a 44 px touch target or more. |
loading | boolean | false | Spinner, aria-busy, disabled while true. |
asChild | boolean | false | Render the child element (for example a link) with button styling. |