Stateful Button
Click-triggered state machine button with idle → loading → success transitions. Zero-dependency animations using CSS transitions and keyframes.
| Prop | Type | Default | Description |
|---|---|---|---|
loadingDuration | number | 4000 | Duration of loading state in ms (auto mode only) |
successDuration | number | 2000 | Duration of success state in ms |
onClick | (done: () => void) => void | — | Click handler with done callback for async control |
color | string | "rgb(34, 197, 94)" | Background color (CSS color value) |
children | React.ReactNode | — | Button label |
className | string | — | Additional CSS classes |