Button
Displays a button or a component that looks like a button.
Installation
import { Button } from "@sourceful-energy/ui"Usage
Variants
Default
Secondary
Destructive
Outline
Ghost
Link
Sizes
With Icon
Icon Only
Loading
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. |
| asChild | boolean | false | Render as a child component (e.g., Link). |
| disabled | boolean | false | Whether the button is disabled. |
Accessibility
- Uses native
<button>element - Supports keyboard navigation (Tab, Enter, Space)
- Disabled state prevents interaction and is announced to screen readers
- Focus ring visible for keyboard users