Button / buttonStyles
Full specificationTriggers an action with a consistent visual hierarchy.
Use when
- Submitting or confirming an action
- Providing a compact inline or icon action
Avoid when
- Navigation that should be a link
- Non-interactive status text
Full API contract
API
| Prop | Type | Default | Meaning |
|---|---|---|---|
| variant | ButtonVariant | primary | primary, secondary, destructive, ghost, filter, filter-active, or icon. |
| size | ButtonSize | md | inline, sm, md, lg, xl, or icon. |
| fullWidth | boolean | false | Expands the button to the available width. |
| type | button | submit | reset | button | Native button type. |
| className | string | undefined | Additional classes. |
States
- default
- hover
- focus-visible
- disabled
Accessibility
- Uses a native button and forwards its ref.
- Provide an accessible name for icon-only buttons.
Composition
- Children provide the button label or icon.
- buttonStyles accepts the same visual options for custom elements.
Example
<Button variant="primary">Save changes</Button>
