Button
Triggers an action. Springy press feedback, a loading state that grows in place, and seven variants.
InputsRadix Slot
Playground
Tweak the props, the preview and the code follow.
Props
import { ArrowRight } from "lucide-react"
import { Button } from "@/components/ui/button"
<Button>
Continue
<ArrowRight />
</Button>Installation
npx @plumsydev/plum-ui add buttonUsage
import { Button } from "@/components/ui/button"<Button variant="outline">Button</Button>Examples
Variants
Sizes
Loading
The spinner animates its width so the label never jumps.
As child
Render any element — like a Next.js Link — with button styles.
API Reference
Button
Extends the native button element.
| Prop | Type | Default |
|---|---|---|
variantVisual style. | "default" | "brand" | "secondary" | "outline" | "ghost" | "destructive" | "link" | "default" |
sizeHeight and padding. | "xs" | "sm" | "default" | "lg" | "xl" | "icon" | "icon-sm" | "icon-xs" | "default" |
loadingShows an inline spinner and sets aria-busy. | boolean | false |
asChildMerge props onto the child element instead of rendering a button. | boolean | false |
Notes
- Use
buttonVariants()to give any element button styles without the component.