Back to library

Radio group

Choose one option from a group.

Delivery speed

Recommended API

Property or elementTypeExample initial valueDescription
nameShared per-instance stringGenerated nameGroup choices into one field.
value and checkedForm value and Booleanstandard initially checkedSet the value each option represents and the starting choice.

States

StateTriggerResult
selectedChoose a row or use the arrow keys within the group.The chosen row is highlighted and the previous one clears.
focusedEnter the group with Tab.A focus ring surrounds the radio row.

Svelte implementation guidance

Choose one delivery option using native radio buttons. Arrow-key navigation follows the browser. Each example instance uses its own group name.

Use the supplied svelte example as a starting point. Preserve the native control semantics, labels, keyboard behavior and project conventions. Verify with keyboard and the target browser.

CSS variables

VariableTypeDefaultDescription
--q-textcolor #28302aMain text and foreground color.
--q-mutedcolor #70776fColor for secondary text.
--q-font-sizelength 13pxBase size for the component text.
--q-accentcolor #344e41Accent for active controls, indicators and focus.
--q-surfacecolor #ffffffSurface for controls and cards.
--q-bordercolor #dce0d8Color for outlines and dividers.
--q-radiuslength 10pxBase corner radius.
--q-gaplength calc(var(--q-space) * 2)Space between items, based on the spacing unit.
--q-control-pxlength calc(var(--q-space) * 4)Horizontal padding for controls.
--q-control-pylength calc(var(--q-space) * 2.5)Vertical padding for controls.
--q-spacelength 4pxBase unit for gaps and padding.