Button
To build in the appCanon 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
#variantsSizes
#sizesWith icon
#with-iconTrailing icon
#icon-endicon_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
#disabledLow 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
#splitPrimary, 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-onlyBorderless 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-destructiveghost-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.
As a link
#as-linkProps
| Name | Type | Default | Notes |
|---|---|---|---|
| variant | primary | secondary | tertiary | contrast | ghost | ghost-destructive | ghost-success | link | link-navy | primary | contrast 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 |
| size | sm | md | lg | md | |
| disabled | boolean | false | |
| href | string | — | Renders a link; ignored while disabled |
| icon | string | — | Vendored icon name. Renders duotone unless it is a mark (plus, times, check, chevrons, arrows, ellipses, filter…), which render solid (2026-10-05) |
| icon_position | start | end | start | Added 2026-10-07, outside the canon row. end trails the label, for a direction ("View Transactions →"); ignored on icon-only buttons |
| icon_family | light | 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 |
| title | string | — | 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 |
| split | boolean | false | Adds the menu trigger. Primary (2026-11-10), tertiary and ghost have their own split styles; the main half follows href like any Button |
| split_icon | kebab | caret | kebab | Split 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_label | string | "More actions" | Split only: the trigger's accessible name |
| menu | ReactNode | — | Split only. The kebab becomes a Popover trigger (bottom-end, w-52); build the items with PopoverClose so they close it |
| onSplitClick | MouseEventHandler | — | Split only, when there is no menu: the kebab's click handler |
| color | IconButtonColor | stone-light | Icon-only resting colour |
| hover_color | IconButtonHoverColor | stone | Icon-only hover colour |
| ref | Ref<HTMLButtonElement | HTMLAnchorElement> | — | Forwarded to the rendered element |