Skip to content

TkxRadio

import { TkxRadio } from 'tekivex-ui';
Shipping speed — single choice from a group

Selected: standard

const [speed, setSpeed] = useState('standard');
<TkxRadio name="speed" value="eco" checked={speed === 'eco'} onChange={() => setSpeed('eco')} label="Eco — 5–7 days" />
<TkxRadio name="speed" value="standard" checked={speed === 'standard'} onChange={() => setSpeed('standard')} label="Standard — 2–3 days" />
<TkxRadio name="speed" value="express" checked={speed === 'express'} onChange={() => setSpeed('express')} label="Express — next day" />

All radios in a group share the same name prop. Keyboard arrows cycle through siblings (roving tab-index).

With disabled option
Color schemes
PropTypeRequiredDescription
labelReactNode
hintstring
size'sm' | 'md' | 'lg'
colorScheme'primary' | 'success' | 'danger'
  • Keyboard navigation supported on all interactive elements
  • :focus-visible outline at 2px (theme-token primary)
  • ARIA roles and properties applied per WAI-ARIA 1.2
  • Respects prefers-reduced-motion
  • Minimum 44×44 touch target where applicable

The implementation lives at src/components/TkxRadio.tsx.

For a full interactive sandbox where you can change every prop and watch the rendered radio group update in real time, open the playground.