Button
Versatile button with variants, sizes, loading state, and icon support.
Installation
npx shadcn@latest add https://fluid-functionalism.vercel.app/r/button.jsonVariants
Sizes
With Icons
Loading & Disabled
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "primary" | "secondary" | "tertiary" | "ghost" | "primary" | Visual style of the button. |
| size | "sm" | "md" | "lg" | "icon-sm" | "icon" | "icon-lg" | "md" | Size of the button. |
| loading | boolean | false | Shows a spinner and disables the button. |
| leadingIcon | LucideIcon | — | Icon displayed before the label. |
| trailingIcon | LucideIcon | — | Icon displayed after the label. |
| asChild | boolean | false | Merge props onto the child element instead of rendering a <button>. |
| disabled | boolean | false | Disables the button. |