Skip to content
Nana UI

Radio

A single radio control — a circle + label. Selection is mutually exclusive and owned by the parent nana-radio-group, which manages the checked value, keyboard roving and form association; on its own a radio still renders and fires nana-change. Rebrand by overriding --nana-radio-accent (or the global --nana-surface-accent) — no need to fork the component.

Card Cash
Terminal window
npm install @nana-tec/ui-components
import "@nana-tec/ui-components/radio";
<nana-radio-group value="card" label="Payment">
<nana-radio value="card">Card</nana-radio>
<nana-radio value="cash">Cash</nana-radio>
</nana-radio-group>

Each nana-radio takes a label and optional description.

Set orientation="horizontal" on the group.

PropertyTypeDefaultDescription
valuestring''Submitted / emitted value for this option
checkedbooleanfalseSelected state (normally driven by nana-radio-group)
disabledbooleanfalseDisable the control
invalidbooleanfalseInvalid styling (set by the group when its validation fails)
labelstring | undefinedConvenience label text (slot wins if both are present)
descriptionstring | undefinedSecondary descriptive text
size'sm' | 'md' | 'lg''md'Control size
EventTypeDescription
nana-changeCustomEventFired on selection (detail.value)
SlotDescription
(default)The label (overrides the label attribute)
descriptionSecondary descriptive text
VariableDefaultDescription
--nana-radio-accentSelected fill / border colour
--nana-radio-dot-colorInner dot colour
--nana-radio-borderUnselected border colour
--nana-radio-bgCircle background
--nana-radio-sizeCircle diameter (overrides size preset)
PartDescription
controlThe clickable row
circleThe radio circle
labelThe label text
  • Keyboard accessible
  • Screen-reader labels
  • Focus-visible states
  • ARIA roles and states
  • WCAG 2.2 AA contrast
Explore Radio interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook