Button
A button component with multiple variants, sizes, and loading state.
Installation
tsx
npx smi-ui add buttonPreview
Variants
Sizes
Loading
Usage
tsx
import { Button } from "@/components/ui/button"
export function Example() {
return (
<Button variant="default" size="default">
Click me
</Button>
)
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | default | destructive | outline | secondary | ghost | link | default | The visual style of the button |
| size | default | sm | lg | icon | default | The size of the button |
| loading | boolean | false | Shows a loading spinner |
| asChild | boolean | false | Render as child component |