Overview

Use a chip toggle group to let people filter a collection by one or more categories, such as year group, topic or pupil group. Each chip switches between selected and unselected. A selected chip shows a tick.

Anatomy

Chip toggle group anatomy

#PartDescription
1GroupChipToggleGroup. Lays chips out in a row that wraps, with an 8px gap. Each chip is a tab stop.
2Chip (selected)ChipToggleGroup.Item. The clickable container. 8px corner radius.
3TickShown only when the chip is selected, so selection never relies on colour alone.
4LabelThe chip's children. One to three words, in sentence case. Cut off with an ellipsis if too long.
5Chip (unselected)Same container without the tick.

When to use

  • Filtering a list, table or dashboard by categories, such as a question bank by year group or results by pupil group.
  • Letting people pick any number of options (type="multiple") or exactly one (type="single") from a short, visible set.

When not to use

  • Showing status, such as Marked or Overdue. Use Badge.
  • A single option, such as Show archived. Use Switch or Checkbox.
  • A long list of options that won't fit in two rows. Use a select or Checkbox Group instead.

Do's and Don'ts

    Do

    Use chips to filter a collection, such as a question bank by year group.

    Don't

    Use chips to show status. Use Badge instead.

    Do

    Use chips to filter results by pupil group, such as Pupil Premium or SEND.

    Don't

    Show a group with only one chip. Use Switch or Checkbox instead.

    Do

    Use one appearance and one size for every chip in a group.

    Don't

    Mix standard and modern chips, or different sizes, in one group.

Choosing an appearance

Standard, modern grey and modern white appearances

  • Modern: use it for all new work. Chips have no border. Selected chips use a light primary background with primary text.
  • Standard (default in code): outlined chips. Keep it on existing screens until they move to modern.

Modern has two themes. Choose the one that contrasts with the surface behind the chips:

  • theme="grey" (default): grey chips, for white surfaces such as cards and pages.
  • theme="white": white chips, for grey surfaces such as filter panels and grey page backgrounds.

theme only affects the modern appearance.

States

Chip states for each appearance

Chips have unselected, hover, selected, selected hover, focus and disabled states. When a chip has keyboard focus it gets the standard focus outline: 2px primary-800, 2px away from the chip, the same as other Atom components. Disabled chips are shown at 30% opacity and can't be selected. Disable a chip only when the reason is clear from the page; otherwise hide it.

Size

Small, medium and large chips

  • Medium (md, default): use it in most places, such as filter bars above lists and dashboards.
  • Small (sm): use it in dense areas, such as inside a table toolbar or a narrow side panel.
  • Large (lg): use it when chips are the main control on the page, or next to large headings.

Use the same size for every chip in a group.

Selection

  • type="multiple": any number of chips can be selected. Use it for filters, where no selection means "show everything".
  • type="single": one chip at a time. Add disableDeselect when there must always be a selection, and include an "All" chip as the first option.

Wrapping and long labels

Chips wrap onto a new row when they run out of space. Labels never wrap inside a chip: a label wider than the group is cut off with an ellipsis. Keep labels to one to three words so this rarely happens.

Chips wrapping onto new rows, with a long label cut off

Accessibility

  • Name the group. Give ChipToggleGroup an aria-label (for example "Filter by year group"), or point aria-labelledby at the visible heading above it.
  • Keyboard. Tab moves from chip to chip, skipping disabled chips, and Shift+Tab moves back. The focused chip shows the standard blue focus outline; Space or Enter selects or deselects it. With type="multiple" the group is a toolbar of toggle buttons (pressed or not pressed). With type="single" it is a radio group (checked or not checked).
  • Never rely on colour alone. The tick marks selected chips. Don't remove it or replace it with colour.
  • Keep labels meaningful on their own. "Year 5", not "5".
  • Touch targets. Medium chips are 32px tall and small chips 24px. Keep the 8px gap between them and avoid placing them next to other small controls.

Structure and spacing

Chip size and spacing

PropertyTokenpxrem
Height - sm-24px1.5
Height - md (default)-32px2
Height - lg-40px2.5
Border radiusradius-md8px0.5
Border (standard only)-1px-
Padding x, chip edgespace-28px0.5
Padding x, labelspace-14px0.25
Text inset without tick-12px0.75
Tick icon - sm & mdsm16px1
Tick icon - lgmd24px1.5
Gap between chipsspace-28px0.5
Focus outline-2px, 2px offset-

Typography

Chip sizeFamilyWeightText sizerempx
sm, mdbody400sm0.875rem14
lgbody400md1rem16

Colour

AppearanceStateBackgroundBorderText
StandardUnselectedwhitegrey-600grey-800
StandardHovergrey-200grey-1000grey-1000
StandardSelectedprimary-100primary-800primary-900
Modern greyUnselectedgrey-100nonegrey-800
Modern whiteUnselectedwhitenonegrey-800
ModernHovergrey-200nonegrey-1000
ModernSelectedprimary-200noneprimary-800
ModernSelected hoverprimary-300noneprimary-900
AllFocusUnchanged+ primary-800 outlineUnchanged

Options

OptionIn codeValuesDefault
Selectiontypemultiple, singleRequired
Appearanceappearancestandard, modernstandard
Themethemegrey, white (modern only)grey
Sizesizesm, md, lgmd
Keep one selecteddisableDeselecttrue, falsefalse
DisableddisabledOn the group or on a single chipfalse

Related