Buttons
Usage and anatomy
Button uses explicit parts so labels and icons remain independently composable. Use <Button.Root /> as the interactive element, <Button.Label /> for its text, and <Button.Icon /> for leading or trailing icons.
import * as Button from "@acme/ui/button"import { Star } from "lucide-react"<Button.Root><Button.Icon position="start"><Star /></Button.Icon><Button.Label>Button</Button.Label></Button.Root>
- Set
loadingonButton.Rootto disable interaction and render the spinner automatically. - Use
asChildto apply Button styling to a single child such as a Next.jsLinkwhile preserving the child element's semantics. - Use the Icon Button component for icon-only actions.
Button Variants
License required
In order to get the source code for this component, you need to buy a license.
Button Sizes
License required
In order to get the source code for this component, you need to buy a license.
Button with Icons
License required
In order to get the source code for this component, you need to buy a license.
Button Loading States
License required
In order to get the source code for this component, you need to buy a license.
Button Disabled States
License required
In order to get the source code for this component, you need to buy a license.
Button as Child
License required
In order to get the source code for this component, you need to buy a license.
API reference
Button.Root
| Prop | Type | Default |
|---|---|---|
| variant | primary | secondary | tertiary | destructive | ghost | black | primary |
| size | sm | md | lg | xl | xxl | md |
| loading | boolean | false |
| disabled | boolean | false |
| asChild | boolean | false |
Button.Root also accepts native button props such as type, name, value, and form. Button.Icon accepts position="start" or position="end"; its size and loading state are inherited from Button.Root.