Radio
ImplementedRadio button for a radio group. Wrapped by RadioGroup which manages arrow-key navigation between siblings.
patterns/atoms/radio.htmlSingle-select radio button. Always pair with a name so the group shares state. FR-CA: Bouton radio sélection unique.
Radio
Interactive atom (Family 1 — Tier 1)
Use inside a RadioGroup or any context where only one value is selected.
This component supports light and dark mode.
Interactive demo
Sélection : standard
Usage
import { Radio } from '@epasslive/design-system'
const [shipping, setShipping] = useState('standard')
<div role="radiogroup" aria-label="Mode de livraison">
<Radio name="shipping" value="standard" label="Standard (3-5 jours)" checked={shipping === 'standard'} onChange={() => setShipping('standard')} />
</div>Accessibility
- Native
<input type="radio">with htmlFor label association. - Always wrap siblings in
role="radiogroup"with an aria-label. - Arrow keys move focus + change selection; Space confirms.
Props
value*stringThe radio value (used by the parent group).
label*stringVisible and announced label.
checked*booleanWhether this radio is selected.
name*stringGroup name — must be identical across siblings.
disabledbooleanfalseDisables interaction.
requiredbooleanfalseMarks the group required.
idstringOverride the auto-generated id.
Props
Radio
valuestring—checkedboolean—labelstring—onChange(value: string) => void—Called when the value changes.
disabledbooleanfalseDisables the control.
requiredbooleanfalseMarks the field as required.
errorstring—Error message; takes precedence over helper text.
namestring—Form/field name.
tabIndexnumber—Synced from source — no interface JSDoc yet; document on `Radio.tsx`.
onKeyDownReact.KeyboardEventHandler<HTMLInputElement>—Synced from source — no interface JSDoc yet; document on `Radio.tsx`.
inputRefReact.Ref<HTMLInputElement>—Synced from source — no interface JSDoc yet; document on `Radio.tsx`.
<Radio />Accessibility
Type
1 ruleARIA
1 ruleUsage
Import
import { Radio } from "@epasslive/design-system"Example 1
<Radio />Example 2
<Radio variant="default" />Anti-patterns
— Do not compose atoms directly — use molecules instead
— Avoid inline styles on atoms