Skip to content

ButtonGroup

ReleasedShipped in 0.2.0StorybookFigma node 192:44Source
  • At the end of a dialog or form, to pair the main action with a way out, such as “Publish review” and “Save as draft”, or “Save role and access” and “Cancel”.
  • Use type destructive when the main action deletes or cancels something, such as “Continue to cancel” and “Keep my booking”.
  • Use type secondary for two actions of equal weight, such as “View” and “Modify” on a trip card.
  • Use layout stack on narrow screens such as the mobile app, with the main action on top.
  • Use type segmented to switch a view between 2 to 4 options, such as the time range “Last 24 hours / 7 days / 30 days / Custom range” on the back office dashboard. Exactly one segment is selected.
  • For a single action: use the Button component instead.
    Instead: Button
  • To filter a list by several values at once: use the Chip component instead. Segments pick exactly one option.
    Instead: Chip
  • For more than three actions, or more than four segments: move the extras into a Dropdown component.
    Instead: Dropdown

From the Figma documentation page (usage node 193:59), as written. These items aren’t carried into ButtonGroup.intent.json, which has no field for them.

  • Put the main action first: on the left in a row, on top in a stack.
  • Use at most one filled button per group; the others are outline.
  • Label buttons with what they do (“Delete account”, “Keep my account”), not “Yes” and “No”.
  • Keep the whole group together; don’t split its buttons across the layout.
  • In a destructive group, make the safe choice easy to find and never the filled button.
Property Value What it is for
type primary primary (filled + outline, default)
type destructive destructive (error + outline)
type secondary secondary (two outlines)
type segmented segmented (2 to 4 options, one selected in navy, the rest outlined; row only)
layout row row (default, main action on the left)
layout stack stack (full width, main action on top; not for segmented)

From Versioning (VERSIONING.md at b9ffb76):

0.3.0 adds six components on top of 0.2.1: Calendar, Card, Form, Modal, SideBar and Table. It contains twenty-three components, each exported from the package root with its props type: Avatar, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Chip, Dropdown, File, Form, Header, Image, Link, Logo, Modal, ProgressBar, RadioCard, SearchBar, SideBar, Stepper, Table, Toggle. Textfield is exported from the package root as well, with TextfieldProps and TextfieldState, and is public like the others (see decisions.md, 2026-10-07, Textfield). It commits you to their props, prop values and defaults, their hz- class names, the tokens in tokens.css and the three entry points (., ./styles.css, ./tokens.css). Everything in 0.3.0 beyond 0.2.1 is an addition: nothing from 0.2.1 was changed, removed or renamed. A change that breaks any of these on 0.x bumps the version to 0.4.0.

Two things about this release are worth knowing:

  • Form, Modal and Table each passed release review with their literal sizes covered by a ruling in decisions.md (Card, SideBar and Calendar have their own), because no size tokens exist for them. Those literals are accepted until the designer adds matching tokens, so a later change to use tokens at the same rendered sizes would be a patch, not a breaking change.
  • Dark theme is not verified for Table, and its warning tag has low contrast. The Table docs page says so. Neither is a breaking-change risk, but a fix that changes a token’s value is a patch and is listed in the changelog.