Skip to content
GitHub (opens in a new tab)

TileGroup

Selectable cards for a plan or option picker. Single or multi select, with title, description, and a price or meta slot.

stableOrganismcontracts/tilegroup.json

Preview

TileGroup

Selectable cards for a plan or a set of options. Title, description, and a price slot. Single or multi select, with checked and disabled tiles.

Master

Single select with Pro checked and Scale disabled. Pick a plan; arrow keys move through the tiles.

Usage

Single select is a radiogroup. Multi select is a checkbox group. meta is the price slot. A disabled item stays visible and cannot be checked. Focus shows the shared canvas-plus-ring, the same as Button and Input.

Do's

  • Choosing a plan, tier, or option where title, description, and price should be compared
  • A short set of cards, one selected or several

Don'ts

  • Short labels with no description — use SegmentedControl
  • A plain radio list — use RadioGroup
  • Independent settings that take effect immediately — use Switch
  • A framed content tile that is not a choice — use Card
<TileGroup
  ariaLabel="Plan"
  selection="single"
  value="pro"
  onChange={() => {}}
  items={plans}
/>

When to use

  • Choosing a plan, tier, or option where title, description, and price should be compared
  • A short set of cards, one selected or several

When not to use

  • Short labels with no description — use SegmentedControl
  • A plain radio list — use RadioGroup
  • Independent settings that take effect immediately — use Switch
  • A framed content tile that is not a choice — use Card

What an agent reads

import { TileGroup } from "agentic-ds-kit";
must
  • selection=single is a radiogroup of radio buttons; arrows move the checked tile
  • selection=multiple is a group of checkbox buttons; arrows move focus and Space toggles
  • aria-checked reflects checked tiles
  • Roving tabindex
  • Disabled tiles stay in the group and cannot be checked
  • focus-visible kit ring
defaults
  • selection single
  • disabled false
stops if
  • Do not invent Tile, TileGroupItem, or PlanPicker cousins
  • Do not use RadioGroup layout=card when the option needs a price slot
  • Do not use raw hex
  • Do not ship the group without ariaLabel

From contracts/tilegroup.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
ariaLabelstringYes—Names the group.
itemsarrayYes—meta is the price or other short slot at the end of the title row.
selectionsingle | multipleNosingle—
valuestring | string[]No—controlled. string when selection is single, string[] when multiple.
defaultValuestring | string[]No—uncontrolled
onChangefunctionNo—(value: string) => void for single, (value: string[]) => void for multiple
disabledbooleanNofalseLocks the whole group. A disabled item stays visible and cannot be checked.
  • Component
    →

    SegmentedControl

    Choose one of a few visible options in a joined track. role=radiogroup, sm or md, icons optional.

  • Component
    →

    RadioGroup

    Choose exactly one option from a small visible set.

  • Component
    →

    Switch

    Immediate on/off setting.

  • Component
    →

    Card

    Framed tile with optional header, body, and footer actions.