Button
A clickable control that triggers an action, supporting six visual variants and three sizes.
Installation
npx @obi/ui add buttonPreview
Usage
import Button from '@/src/components/Button/Button';
export default function Example() {
return (
<div className="flex flex-wrap gap-2">
<Button>Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="outlined">Outlined</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="link">Link</Button>
<Button variant="destructive">Destructive</Button>
</div>
);
}Props
| Name | Type | Default | Description |
|---|---|---|---|
| variant | "primary" | "secondary" | "outlined" | "ghost" | "link" | "destructive" | "primary" | Visual style of the button. |
| size | "sm" | "md" | "lg" | "md" | Height and padding of the button. |
| disabled | boolean | false | Disables the button and suppresses all pointer and focus interaction. |
| className | string | "" | Additional Tailwind classes merged onto the button element. |