THEME
MOTION
HAPTIC
SOUND
BUTTON
General-purpose button. Variants: default / primary / danger. Supports declarative AI actions.
Live demo
Import
import { Button } from '@cathode-ui/react'; Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
children | ReactNode | — | yes | |
variant | 'default'|'primary'|'danger' | default | — | |
icon | ReactNode | — | — | |
disabled | boolean | false | — | |
onClick | () => void | — | — | |
ai | ButtonAIConfig | — | — | Declarative AI intent; provider is routed from CathodeProvider. |
onActionResult | (result: string) => void | — | — |
Examples
primary
<Button variant="primary" onClick={save}>SAVE</Button> ai
<Button ai={{ action: "explain", context: data }} onActionResult={setExplanation}>EXPLAIN</Button> Accessibility
Role: button
- aria-label for icon-only usage
Feedback
| Haptic | primary→confirm · danger→destructive · default→tap |
| Sound | primary→confirm · danger→destructive · default→click |
Motion states
idle · press