Button
Displays a button or a component that looks like a button.
Preview
Installation
$npx shadcn add @dot/button
Usage
import { Button } from "@/components/ui/button"
export default function Example() {
return <Button>Click me</Button>
}Examples
Variants
Sizes
Icon Buttons
With Icons
Disabled
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | "default" | The visual style of the button. |
| size | "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "default" | The size of the button. |
| asChild | boolean | false | Render as a child element using Radix Slot. |