Button

To build in the app

Canon button. Primary and secondary carry the brutalist lift; ghosts and link are flat. Icon-only buttons show their title as the canon Tooltip on hover and focus; a split button with a menu opens a Popover from its kebab. Tertiary and split carry the 1px stone-400 outlined-control line (stone-300 until DES2-11, 2026-10-23; the split's divider stays stone-300) — semibold label, solid icons, darkening to stone-500 on hover (2026-09-26); ghosts have no border. Glyphs are duotone where the icon is a picture — a pen, a printer, a bin — and solid where it is a mark, because duotone's 40% secondary falls between a body and its detail on one and across the stroke itself on the other (2026-10-05; this replaced solid-only and the regular default that followed it). Disabled is low contrast in every direction — stone-200 fill, a border of the same value so there is no edge, stone-400 label — and the filled variants keep their 2px border so the primary action still reads as the primary action (P8). Every branch forwards ref and rest props, so a Button is a valid Radix asChild trigger as a button or a link.

App: Ui::ButtonComponent (to build)

Variants

#variants

Sizes

#sizes

With icon

#with-icon

Trailing icon

#icon-end

icon_position="end" puts the glyph after the label, for a direction: the arrow says where the link goes. The Overview's "View Transactions" rows and "Invoicing reports" footer use the link-navy variant this way.

Disabled

#disabled

Low contrast in every direction: the fill a step darker (stone-200), the border the same value as the fill so there is no edge, and the label at stone-400. The filled variants keep their 2px border, so the primary action still reads as the primary action (P8).

Split with a menu

#split

Primary, tertiary and ghost have their own split styles; other variants fall back to ghost. With menu, the trigger opens a Popover (bottom-end) and each PopoverClose item closes it. Without menu, onSplitClick gets the click. split_icon caret is for a menu of other ways to do the button's own action (the primary here, the Overview's Collect payments).

Icon-only

#icon-only

Borderless with a hover wash. title is required: it becomes the accessible label and the canon Tooltip, shown on hover and keyboard focus (also while disabled). No native title. Colours come from color / hover_color rather than from variant — with one exception, below.

Icon-only, destructive

#icon-only-destructive

ghost-destructive is the one variant an icon-only button honours. It rests as quiet as any other row action — a column of red glyphs would read as a column of errors — and turns on hover and keyboard focus: error text on the error wash, the pair the danger row in a table menu already uses. Hover the first two.

Props

NameTypeDefaultNotes
variantprimary | secondary | tertiary | contrast | ghost | ghost-destructive | ghost-success | link | link-navyprimarycontrast is outside the canon's seven: ink on colour, for the action inside a status Banner, where rust and navy fight the status colour and tertiary disappears into it. Flat, no brutalist lift (the shadow is stone-dark too, so it would read as a smear). See HANDOFF.md
sizesm | md | lgmd
disabledbooleanfalse
hrefstring—Renders a link; ignored while disabled
iconstring—Vendored icon name. Renders duotone unless it is a mark (plus, times, check, chevrons, arrows, ellipses, filter…), which render solid (2026-10-05)
icon_positionstart | endstartAdded 2026-10-07, outside the canon row. end trails the label, for a direction ("View Transactions →"); ignored on icon-only buttons
icon_familylight | regular | solid | duotone—Overrides the duotone/solid pick. The workshop's buttons are duotone; duotone splits a mark across its own stroke, which is why marks opt out
titlestring—Required for icon-only: becomes aria-label and the canon Tooltip (placement bottom, shown on hover and focus, also while disabled). The native title attribute is dropped
splitbooleanfalseAdds the menu trigger. Primary (2026-11-10), tertiary and ghost have their own split styles; the main half follows href like any Button
split_iconkebab | caretkebabSplit only. caret is the canon's disclosure angle-down (regular, sm), for a menu of other ways to do the button's own action
split_labelstring"More actions"Split only: the trigger's accessible name
menuReactNode—Split only. The kebab becomes a Popover trigger (bottom-end, w-52); build the items with PopoverClose so they close it
onSplitClickMouseEventHandler—Split only, when there is no menu: the kebab's click handler
colorIconButtonColorstone-lightIcon-only resting colour
hover_colorIconButtonHoverColorstoneIcon-only hover colour
refRef<HTMLButtonElement | HTMLAnchorElement>—Forwarded to the rendered element