Triggers an action. Seven hierarchies, four heights, destructive and icon-only forms.
atomActionsFigma 108:10903, 108:12452, 108:10850
Default
A primary action next to the default secondary gray button.
Installation
Import
Lives in src/design-system/components/button.tsx.
import { buttonIconSize, buttonClasses, Button, CloseButton } from "@/design-system/components/button";Usage
<Button variant="primary">Create project</Button>
<Button>Cancel</Button>
<Button variant="tertiary-gray" iconOnly aria-label="Edit project">
<Icon name="pencil" size={20} />
</Button>
<Link href="/projects" className={buttonClasses("md")}>View project</Link>Examples
Variants
Seven hierarchies, from the primary action down to plain links.
Sizes
sm 28px, md 36px (default), lg 40px and xl 44px tall.
With icons and dot
Icons go straight in as children; icon-only buttons need an aria-label.
Destructive and disabled
The red version is for actions that can't be undone; disabled dims any button.
When to use
Use it when
- Any action with a label: save, create, cancel, open
- Icon-only actions (edit, close, add) with iconOnly and an aria-label
- A link that should look like a button: buttonClasses() on <Link>
Don’t use it when
- The clickable thing is a card, tile, row or custom chip → Pressable
- Navigating between views of one page → Tabs
- Choosing one of several options in a form → Radio or Choice chip
- A list of actions behind one trigger → Dropdown menu
Rules
- One primary button per view or dialog; everything else secondary-gray (the default)
- Text is 14px at every size (12px for sm); sizes change height only: sm 28, md 36, lg 40, xl 44
- destructive only for actions that delete or can't be undone
- Never override size or colour with className
Properties
Button
| Prop | Type | Default |
|---|---|---|
size | "sm" | "md" | "lg" | "xl" | "md" |
variant | "primary" | "secondary-color" | "secondary-gray" | "tertiary-color" | "tertiary-gray" | "link-color" | "link-gray" | "secondary-gray" |
dot | boolean | false |
destructive | boolean | false |
iconOnly | boolean | false |
* required
Accessibility
- iconOnly needs aria-label
- Focus shows a 4px ring; disabled removes it from the tab order
Related
GlyphAgent limits cardAlertAuth cardBar list cardColour pickerCommand menuDropdown menuFile uploadNotification CenterPaginationDrawerSettings ModalToast
Used in the Avesk app: Dashboard, Projects & Clients, Finance & Growth, Design Inspiration, Proposals & Scope, Onboarding, App shell.