A one-shot action. primary is ink-filled and appears once per section; ghost is outlined for secondary actions; quiet is filled for low-emphasis actions such as Cancel. Icons come from Hugeicons and inherit the button's ink.
import { Button, IconButton } from "@puckoops/camelot";| Name | Description | Default | Control |
|---|---|---|---|
| onClick | function | - | - |
| variant | Visual weight "primary""ghost""quiet" | "ghost" | |
| size | 32px, 36px (default) or 44px "sm""md""lg" | "md" | |
| iconStart | IconDefinition | - | - |
| iconEnd | IconDefinition | - | - |
| asChild | Render the child element (a link, say) with the button's styling. boolean | - | - |
| loading | boolean | - | |
| children | ReactNode | - |
Also takes ButtonHTMLAttributes<HTMLButtonElement>.
Use Button for anything that fires an action: submit, save, open a drawer. One primary per section; everything else is ghost or quiet. Use IconButton for a toolbar or row action that is a single glyph, and always give it an aria-label.
Secondary actions beside a primary, or on their own in a filter row.
The lowest weight: Cancel, Clear, dismissive actions.
Icons sit 8px from the label and take its ink.
Large is for the landing page; the product uses medium and small.
IconButton is 32px (or 28px small) and always needs an aria-label.
Every variant at rest, with an icon, and disabled. Hover and tab to see the states.