RadioCard
When to use it
Section titled “When to use it”- To pick one option from two to five where each needs a line of detail, such as the rate (“Whole apartment · non refundable”), when to pay, or which saved card to use at checkout.
- Use the trailing text for the price of each option, such as “484.00 EUR” or “0.00 EUR now”; turn it off when options have no price, such as payment methods.
- Use state disabled for an option that exists but can’t be picked right now, such as a sold-out rate, and say why in the description.
Where it goes
Section titled “Where it goes”- Stacked vertically in a radiogroup (the Group story, as in the Figma “Payment group”).
When not to use it
Section titled “When not to use it”- For more than five options, or options with no detail: use a Dropdown.
Instead: Dropdown - To pick several options: use Checkboxes.
Instead: Checkbox - To switch a view, such as a time range: use Buttongroup type segmented.
Instead: ButtonGroup
Both Dropdown and RadioCard claim five options. RadioCard’s first “when to use” item says “To pick one option from two to five where each needs a line of detail, such as the rate (“Whole apartment · non refundable”), when to pay, or which saved card to use at checkout.” and Dropdown’s first says “To pick one value from a list of five or more, such as the property filter “All properties” on the back office calendar, or “Who” in the activity log filters.” (Dropdown).
From the release review, under “Findings outside the gates”, as written:
Dropdown and RadioCard both claim five options. Dropdown says “five or more”, RadioCard says “two to five”. The boundary at exactly five is claimed by both. Check 6 passes on the literal test, and each intent points to the other. Owner: the designer.
Best practice
Section titled “Best practice”From the Figma documentation page (usage node 212:49), as written. These items aren’t carried into RadioCard.intent.json, which has no field for them.
- Always preselect one card, usually the recommended or the current choice, such as the default card.
- Stack cards vertically with 8px between them, all the same width, and make the whole card clickable.
- Keep the title short and put conditions in the description, such as “free cancellation until 12 Sep”.
What each variant is for
Section titled “What each variant is for”| Property | Value | What it is for |
|---|---|---|
state |
unselected |
(default) |
state |
selected |
blue border and filled radio |
state |
disabled |
greyed out, can’t be picked |
Accessibility
Section titled “Accessibility”- The control is a native <input type=“radio”>, so keyboard (Tab, arrow keys within a name group), focus and disabled behaviour are the browser’s own; state=“disabled” sets the real disabled attribute.
src/components/RadioCard/RadioCard.tsx:34 - The whole card is one <label> around the input, so clicking anywhere on the card selects it and the title and description give it its accessible name.
src/components/RadioCard/RadioCard.tsx:32 - The drawn radio is decorative (aria-hidden); checked state is carried by the native input.
src/components/RadioCard/RadioCard.tsx:41
What this version promises
Section titled “What this version promises”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.
Stories
Section titled “Stories”All States
Section titled “All States”The single-variant stories (Unselected, Selected, Disabled, UnselectedWithoutDescription, SelectedWithoutDescription, DisabledWithoutDescription, UnselectedWithoutTrailing, SelectedWithoutTrailing, DisabledWithoutTrailing, SelectedTitleOnly) are rows of the variant matrix; the Design tab links each one.
Import
Section titled “Import”import { RadioCard } from "@layerbasesystemic/horizon-design-system";import type { RadioCardProps, RadioCardState } from "@layerbasesystemic/horizon-design-system";@layerbasesystemic/horizon-design-system/tokens.css and @layerbasesystemic/horizon-design-system/styles.css must be loaded too; see Developing.
| Prop | Type | Default | Description |
|---|---|---|---|
state |
RadioCardState |
"unselected" |
unselected (default), selected or disabled. Controlled: the parent group owns which card is selected. |
title |
string |
"Whole apartment · 2 bedrooms" |
— |
description |
string |
"Sleeps 4 · free cancellation until 12 Sep" |
— |
showDescription |
boolean |
true |
— |
showTrailing |
boolean |
true |
— |
trailing |
string |
"484.00 EUR" |
— |
RadioCardProps also extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" \| "children" \| "title" \| "checked" \| "defaultChecked" \| "disabled">, so native attributes pass through to the element (RadioCard.tsx:6).
Props that are not Figma properties. The stories’ header comment says: “Not Figma properties: name, value, onChange and other input attributes. state is controlled: the group (see Group story, as in the Figma “Payment group”) decides which card is selected. Figma draws no hover or pressed state; keyboard focus shows the focus-border ring.” (RadioCard.stories.tsx:6-8). state is controlled: checked is state === "selected" and, when onChange is omitted, a no-op handler is supplied (RadioCard.tsx:38).
From the release review, under “Findings outside the gates”, as written:
Props that are not Figma properties. name, value, onChange and the other input attributes pass through to the input (the story header says so). They are part of the public API once published (a 0.x breaking-change surface for VERSIONING.md). state is controlled: the parent owns which card is selected, and when onChange is omitted a no-op handler is supplied (RadioCard.tsx:38). Owner: a human, to accept them as intended API.
The group role is not part of the component. RadioCard.tsx never sets role="radiogroup"; the Group story does, around the cards (RadioCard.stories.tsx:85).
From the release review, under “Findings outside the gates”, as written:
Radio group role is not part of the component. Arrow-key navigation works only when the cards share a name (stories pass one), and the role=“radiogroup” and its label live in the Group story, not in the component. A consumer who stacks cards without both loses the group semantics. The intent’s placement says “Stacked vertically in a radiogroup”, but nothing enforces it. Owner: a human.
Union types
Section titled “Union types”RadioCardState: unselected, selected, disabled
Tokens it needs
Section titled “Tokens it needs”Every CSS custom property RadioCard.css reads, with its value in the token build at b9ffb76.
| Token | Light | Dark |
|---|---|---|
--border-width-md |
2px |
same as light |
--border-width-sm |
1px |
same as light |
--color-bg-elevated |
#f9fafb |
#4d5361 |
--color-border-default |
#d7dee7 |
#4d5361 |
--color-border-focus |
#1d44ba |
#6692f8 |
--color-border-strong |
#c8d2dd |
#6a7180 |
--color-border-subtle |
#eef1f5 |
#272a37 |
--color-primary-default |
#2b5ad6 |
#6692f8 |
--color-state-disabled-bg |
#e5e7ed |
#4d5361 |
--color-text-disabled |
#d1d5db |
#6a7180 |
--color-text-primary |
#161925 |
#f9fafb |
--color-text-secondary |
#4d5361 |
#9ca2b1 |
--fontfamily-body |
Inter |
same as light |
--fontsize-md |
12px |
same as light |
--fontsize-xl |
14px |
same as light |
--lineheight-md |
18px |
same as light |
--lineheight-xl |
20px |
same as light |
--radius-full |
999px |
same as light |
--radius-xs |
2px |
same as light |
--spacing-lg |
16px |
same as light |
--spacing-md |
12px |
same as light |
--spacing-xs |
4px |
same as light |
This matches required_tokens in RadioCard.intent.json exactly.
Figma node
Section titled “Figma node”Page Radiocard (57:1644), documentation frame ❖ radiocard (212:22), component set radiocard (212:21). The file is shared with the team only, so the frame and the link ask anyone outside it to sign in.
Variant matrix
Section titled “Variant matrix”state (3) × showDescription (2) × showTrailing (2) = 12 cells. The component set (212:21) publishes three variants, state=unselected (212:2), state=selected (212:8) and state=disabled (212:15). showDescription and showTrailing are boolean component properties of the set, not variants, so the other nine combinations (3 x 2 x 2 = 12) are the same three variants with the description or the trailing text switched off. The documentation frame (212:22) draws only the three variants, one per state, and a “Payment group” of three instances (212:27, 212:35, 212:42). Figma draws no hover, pressed or focus state.
state |
Figma node | Story |
|---|---|---|
unselected |
212:2 |
Unselected |
selected |
212:8 |
Selected |
disabled |
212:15 |
Disabled |
showDescription: true, false. Stories that set showDescription: Unselected Without Description, Selected Without Description, Disabled Without Description, Selected Title Only; it defaults to true.
showTrailing: true, false. Stories that set showTrailing: Unselected Without Trailing, Selected Without Trailing, Disabled Without Trailing, Selected Title Only; it defaults to true.
Themes
Section titled “Themes”The radiocard component set renders every cell once, in one theme. It has no separate light and dark frames.
The token build defines 179 tokens for light and redeclares 50 for dark; the Code tab shows RadioCard’s tokens in both.
Values Figma never bound
Section titled “Values Figma never bound”Values on the Figma node that aren’t bound to a variable, and what RadioCard.css at b9ffb76 does with each.
| Layer | Property | Figma value | In the code |
|---|---|---|---|
| card, every state (212:2, 212:8, 212:15) | width (a fixed 480 in Figma; the code stretches to its parent) | 480px |
width: 100%; |
| card, state=unselected (212:2) | border colour (bound in Figma to the variable color/border/subtle, which is not named like a –color-… token; the code reads –color-border-subtle) | #eef1f5 |
border: var(--border-width-sm) solid var(--color-border-subtle); |
| Radio, every state (212:3, 212:9, 212:16) | width and height | 18px |
width: 18px; |
| Dot, state=selected (212:10) | width and height | 8px |
width: 8px; |
Figma variables against the token build
Section titled “Figma variables against the token build”| Figma variable | Figma value | Token in the build | Built light value | Agrees |
|---|---|---|---|---|
--radius-full |
999 |
--radius-full |
999px |
yes |
--border-width-sm |
1 |
--border-width-sm |
1px |
yes |
--color-bg-elevated |
#f9fafb |
--color-bg-elevated |
#f9fafb |
yes |
--color-border-strong |
#c8d2dd |
--color-border-strong |
#c8d2dd |
yes |
--color-text-primary |
#161925 |
--color-text-primary |
#161925 |
yes |
--fontSize-xl |
14 |
--fontsize-xl |
14px |
yes |
--fontWeight-medium |
Medium |
no such token | — | no token |
--fontFamily-body |
Inter |
--fontfamily-body |
Inter |
yes |
--lineHeight-xl |
20 |
--lineheight-xl |
20px |
yes |
--color-text-secondary |
#4d5361 |
--color-text-secondary |
#4d5361 |
yes |
--fontSize-md |
12 |
--fontsize-md |
12px |
yes |
--fontWeight-regular |
Regular |
no such token | — | no token |
--lineHeight-md |
18 |
--lineheight-md |
18px |
yes |
--spacing-xs |
4 |
--spacing-xs |
4px |
yes |
--fontWeight-semibold |
Semi Bold |
no such token | — | no token |
--spacing-md |
12 |
--spacing-md |
12px |
yes |
--spacing-lg |
16 |
--spacing-lg |
16px |
yes |
--radius-xs |
2 |
--radius-xs |
2px |
yes |
--color-primary-default |
#3b71f2 |
--color-primary-default |
#2b5ad6 |
no |
--color-state-disabled-bg |
#e5e7ed |
--color-state-disabled-bg |
#e5e7ed |
yes |
--color-border-default |
#d7dee7 |
--color-border-default |
#d7dee7 |
yes |
--color-text-disabled |
#d1d5db |
--color-text-disabled |
#d1d5db |
yes |
--fontWeight-medium, --fontWeight-regular, --fontWeight-semibold are bound in Figma but the token build has no token of that name.
1 colour variable in Figma still holds a different value from the token build, so the design file and the shipped component render --color-primary-default differently.
Design gaps recorded against it
Section titled “Design gaps recorded against it”Card height. RadioCard.css sets box-sizing: border-box;, border: var(--border-width-sm) solid var(--color-border-subtle); and padding: var(--spacing-lg); on the card. Figma’s frames (212:2, 212:8, 212:15) are 74px high.
From the release review, under “Findings outside the gates”, as written:
Card height is 76px, Figma’s frame is 74px. Figma node 212:2 lays the card out as 16px padding, a 20px title, a 4px gap and an 18px description, which is 74px with the 1px stroke inside the frame. The CSS uses box-sizing: border-box with a 1px border and 16px padding, so the card is 76px (the QA report measured and accepted 76x76, and 54px without description). This is the same stroke-inside against stroke-outside difference as Chip. Not a gate finding. Owner: a human, to accept it or ask the engineer to adjust.
Colour drift. The Figma variable --color-primary-default (#3b71f2) holds a different value from the token build; see the table above. RadioCard.css reads it for the selected border, the radio border and the dot.
From the release review, under “Findings outside the gates”, as written:
Pipeline colour drift. QA recorded the selected state rendering with –color-primary-default #2b5ad6 where Figma’s variable export gives #3b71f2, the same accepted drift as Button, Chip and Toggle. QA also notes Checkbox uses –color-interactive-primary (#3b71f2), so Checkbox and RadioCard render different blues. Owner: the designer, to confirm which is intended.
Focus is not drawn in Figma. The stylesheet has a keyboard-focus rule at RadioCard.css:37: outline: var(--border-width-md) solid var(--color-border-focus);. Figma draws no focus, hover or pressed state.
From the release review, under “Findings outside the gates”, as written:
No focus or pressed state in Figma. Keyboard focus draws a –color-border-focus outline (RadioCard.css:36-39), an engineer’s choice recorded in the QA report. Not drawn in Figma.
- 2026-10-04 · RadioCard radio and dot sizes with no token (decisions.md). These literals in src/components/RadioCard/RadioCard.css are accepted, because they are what the Figma node specifies, until the designer adds matching size tokens. Accepted values:
18px(width,.hz-radiocard__radio, line 47);18px(height,.hz-radiocard__radio, line 48);8px(width,.hz-radiocard--selected .hz-radiocard__radio::after, line 60);8px(height,.hz-radiocard--selected .hz-radiocard__radio::after, line 61). Not ruled: Any other literal value, including a var() fallback. These values in any other component. A change to these values: a different number needs a new ruling or a token. The selected colour, which uses –color-primary-default (#2b5ad6) and differs from the #3b71f2 Figma shows: that is accepted pipeline drift, not a gate finding. The 76px card height against Figma’s 74px (stroke counted outside the frame). Any state Figma does not draw (hover, pressed).
Every commit to src/components/RadioCard up to b9ffb76, newest first, with the published version that carries it.
| Commit | Date | Version | Change |
|---|---|---|---|
c02f816 |
2026-10-04 | 0.2.0 | RadioCard: replace min-width: 1px with 0 (no px literal; layout unchanged) |
122dada |
2026-10-04 | 0.2.0 | RadioCard: build from Figma 57:1644 |