Copy to clipboard
Installation
Copy to clipboard
npx bearnie add button
npx bearnie add button
bunx bearnie add button
bunx bearnie add button
pnpm dlx bearnie add button
pnpm dlx bearnie add button
yarn dlx bearnie add button
yarn dlx bearnie add button
Copy to clipboard
import Button from "@/components/ui/button/Button.astro";
Usage
import { Button } from "@/components/ui/button"
<Button>Button</Button>
Examples
Secondary
Copy to clipboard
Outline
Copy to clipboard
Ghost
Copy to clipboard
Link
Copy to clipboard
Destructive
Copy to clipboard
Success
Copy to clipboard
Warning
Copy to clipboard
Info
Copy to clipboard
With left icon
Copy to clipboard
With right icon
Copy to clipboard
Icon only
Copy to clipboard
Loading
Copy to clipboard
Sizes
Copy to clipboard
As link
Copy to clipboard
Anatomy
Button- A single interactive element with slots for icons
Props
Button
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | default | destructive | outline | secondary | ghost | link | success | warning | info | default | Visual style variant |
| size | xs | sm | default | lg | xl | default | Button size |
| iconOnly | boolean | false | Square button for icon-only use |
| href | string | - | Renders as anchor link |
| disabled | boolean | false | Disables the button |
| class | string | - | Additional CSS classes |