Primitive
Button
Displays a button or a component that looks like a button. Supports multiple variants, sizes, and states.
Installation
npx benflux-ui add buttonUsage
import { Button } from "@benflux-ui/react"
export default function Example() {
return <Button>Click me</Button>
}Sizes
With Icons
Loading State
Disabled
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "default" | "outline" | "ghost" | "secondary" | "destructive" | "gradient" | "glow" | "glass" | "link" | "default" | Visual style of the button |
| size | "xs" | "sm" | "default" | "lg" | "xl" | "icon" | "icon-sm" | "icon-lg" | "default" | Size of the button |
| loading | boolean | false | Shows a loading spinner and disables the button |
| leftIcon | ReactNode | — | Icon rendered before the button text |
| rightIcon | ReactNode | — | Icon rendered after the button text |
| asChild | boolean | false | Merges props onto child element (Radix Slot) |
| animate | boolean | true | Enables tap animation via framer-motion |