Component

Button

A flexible action primitive with variants, sizes, icons, loading states, and full TypeScript props.

Examples

Live previews paired with copyable source.

Variants

Use variants to match the hierarchy of an action.

tsx
<Button variant="primary">Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="outline">Outline</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="link">Link</Button>

Sizes and Icons

Pair sizes with icons for compact toolbars or primary actions.

tsx
<Button size="sm">Small</Button>
<Button size="md" icon={<Check className="h-4 w-4" />}>Confirm</Button>
<Button size="lg" icon={<Download className="h-5 w-5" />}>Download</Button>

States

State styles communicate progress, completion, warnings, and disabled actions.

tsx
<Button state="loading">Loading</Button>
<Button state="success">Success</Button>
<Button state="error">Error</Button>
<Button state="warning">Warning</Button>
<Button state="disabled">Disabled</Button>

API Reference

Props available on the component.

PropTypeDefaultDescription
variant'primary' | 'secondary' | 'outline' | 'ghost' | 'link''primary'Controls the visual style of the button.
size'sm' | 'md' | 'lg''md'Sets the button height, padding, and text size.
state'default' | 'loading' | 'success' | 'error' | 'warning' | 'disabled''default'Displays contextual iconography and state styling.
fullWidthbooleanfalseMakes the button span the full width of its parent.
iconReact.ReactNodeundefinedOptional icon rendered before the button label.
disabledbooleanfalseDisables pointer and keyboard interaction.