Button
A clickable button component with variants for different visual styles and sizes.
npx @slipstream-ui/cli@latest add buttonPlayground
All variants
default
destructive
success
warning
info
outline
outline-destructive
outline-success
outline-warning
outline-info
secondary
ghost
link
Sizes
As a link
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'default' | 'destructive' | 'success' | 'warning' | 'info' | 'outline' | 'outline-destructive' | 'outline-success' | 'outline-warning' | 'outline-info' | 'secondary' | 'ghost' | 'link' | 'default' | Visual style variant (solid and colored outline semantic colors pair with the status tokens) |
| size | 'default' | 'sm' | 'lg' | 'icon' | 'default' | Size variant |
| disabled | boolean | false | Disables the button |
| asChild | boolean | false | Renders the child element (e.g. <a>, <Link>) with button styling instead of a <button>. |
Accessibility
- Full keyboard navigation with Enter and Space keys
- Screen reader support with proper ARIA attributes
- Disabled state is properly announced
- Visible focus indicator for keyboard users
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+ — macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA — the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.