Button
atomTrigger actions and navigation. Supports seven semantic variants (primary, secondary, outline, ghost, danger, danger-outline, danger-ghost), five sizes (2xs–lg), hover lift + glow animation, loading and disabled states, a trailing chevron for dropdown triggers, full-width layout, icon-only auto-sizing (renders as square when no children), transparent outline backgrounds, color-mix(transparent) neutral fills for disabled states, and a single translucent accent halo press ring.
Variants
Seven semantic variants for different action weights, including danger compound variants.
Sizes
Five sizes from ultra-dense toolbars (2xs) to prominent CTAs (lg).
States
Loading, disabled, dropdown chevron, and full-width.
Usage
Installation
API Reference
Button props — * required
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "primary" | "secondary" | "outline" | "ghost" | "danger" | "danger-outline" | "danger-ghost" | "primary" | Visual style of the button. secondary is a filled surface button; outline is a bordered button. danger-outline is a red-bordered variant for destructive actions needing visual weight; danger-ghost is red text on transparent background for low-emphasis destructive actions. |
size | "2xs" | "xs" | "sm" | "md" | "lg" | "md" | Height and horizontal padding scale. 2xs (22px) for dashboard toolbars and table-inline actions; xs (26px) for compact toolbars. |
loading | boolean | false | Replaces the label with a spinner and disables interaction. |
disabled | boolean | false | Prevents interaction and mutes the appearance. |
chevron | boolean | false | Appends a down-chevron icon for dropdown trigger patterns. |
fullWidth | boolean | false | Stretches the button to fill its container. |
leftIcon | ReactNode | — | Icon displayed before the label. |
rightIcon | ReactNode | — | Icon displayed after the label. |
spread | boolean | false | Spaces content to the edges (space-between). Useful with fullWidth + rightIcon/chevron. |
children | React.ReactNode | — | Button label. Omit for icon-only buttons (auto-sizes to square). |
onClick | () => void | — | Callback fired when the button is clicked. |