Skip to main content

Radio

Mutually exclusive selection control. Group multiple radios for single-choice scenarios.

Import​

import { Radio } from '@scaffald/ui';

Basic Usage​

Live Preview
<ThemeProvider initialTheme="light">
<RadioGroup
  label="Select an option"
  options={[
    { label: 'Option A', value: 'a' },
    { label: 'Option B', value: 'b' },
    { label: 'Option C', value: 'c' },
  ]}
  value="a"
/>
</ThemeProvider>

Props​

See the TypeScript definitions for the complete props API.

Common Props​

All Radio components accept standard React Native View props.

Variants​

See component props for available variants.

Examples​

Live Preview
<ThemeProvider initialTheme="light">
<Stack gap={24}>
  <RadioGroup
    label="Vertical (default)"
    options={[
      { label: 'Small', value: 'sm' },
      { label: 'Medium', value: 'md' },
      { label: 'Large', value: 'lg' },
    ]}
    value="md"
  />
  <RadioGroup
    label="Horizontal"
    orientation="horizontal"
    options={[
      { label: 'Left', value: 'left' },
      { label: 'Center', value: 'center' },
      { label: 'Right', value: 'right' },
    ]}
    value="center"
  />
</Stack>
</ThemeProvider>

Accessibility​

  • Keyboard navigation support
  • Screen reader compatible
  • ARIA attributes included
  • Focus management

Design Tokens​

This component uses the following design tokens:

  • Colors: colors.{semantic}.{theme}.{variant}
  • Spacing: spacing.*
  • Typography: typography.*

See Design Tokens for more information.

No related components.

Changelog​

See GitHub Releases for version history.