Components
Button
A versatile button component with multiple variants and sizes
Demo
Code
Button
Installation
Usage
Basic Usage
Variants
Sizes
Loading State
Disabled State
With Icons
API Reference
Button
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Button content |
variant | 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link' | 'default' | Visual variant |
size | 'default' | 'sm' | 'lg' | 'icon' | 'default' | Button size |
disabled | boolean | false | Disable the button |
loading | boolean | false | Show loading spinner |
leftIcon | ReactNode | — | Icon on the left |
rightIcon | ReactNode | — | Icon on the right |
className | string | — | Additional classes for container |
textClassName | string | — | Additional classes for text |
onPress | () => void | — | Press handler |