Button
Drive user action. High-converting variants. Clear states.
Workspace name
Acme Studio
Installation
pnpm dlx nachui add buttonAnatomy
Variants
Sizes
Table row
Invoice #2041
Northwind Labs, $1,280
Form footer
Billing address
Updated 3 days ago
Pricing page
Team plan
$24 per seat, billed monthly
Toolbar
Search this project
Icon size keeps the button square
Secondary
Seats
7 of 10 used on the Team plan
Destructive
Delete billing account
Removes 3 projects and every invoice from March 2024 onward. This cannot be undone.
Outline
Invoices
142 records, Jan 1 to Mar 31
Ghost
q3-roadmap.md
Edited by Nadia 4h ago
Link
Rate limit reached
This workspace made 10,000 API requests in the last hour. Limits reset at 14:00 UTC.
API Reference
Button
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "default" | The button style. |
size | "default" | "sm" | "lg" | "icon" | "default" | The button size. |
loading | boolean | false | Whether the button is in a loading state. |
loader | React.ReactNode | <Loader2 /> | Custom loader component to be displayed when loading. |
leftIcon | React.ReactNode | — | Icon to display on the left side of the button. |
rightIcon | React.ReactNode | — | Icon to display on the right side of the button. |
fullWidth | boolean | false | Whether the button should take up the full width of its container. |
disabled | boolean | — | Disables the button. |
className | string | — | Additional CSS class names. |
type | "button" | "submit" | "reset" | "button" | The type of the button element. |
children | React.ReactNode | — | The button content (text or other elements). |
ButtonGroup
| Prop | Type | Default | Description |
|---|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" | The layout of the button group, either horizontal or vertical. |
attached | boolean | false | Whether the buttons in the group are attached to each other (i.e., no border-radius between buttons). |
className | string | — | Additional CSS class names. |
children | React.ReactNode | — | The buttons inside the group. |
Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.