Components › Actions
Button
A keycap with a real bottom edge. It lifts on hover and sinks when pressed.
Installation
npx plankui@latest add buttonUsage
import { Button } from "@/components/ui/button";
<Button>Save</Button>
<Button variant="secondary" size="sm">Cancel</Button>API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "primary" | "secondary" | "soft" | "outline" | "ghost" | "danger" | "link" | "primary" | Visual style. |
| size | "xs" | "sm" | "md" | "lg" | "icon" | "icon-sm" | "md" | Height and padding. |
| loading | boolean | false | Shows a spinner and blocks clicks. |
| asChild | boolean | false | Render the child element, such as a router link, with button styles. |