RN Neo
Components

Radio

Radio button with an inner dot indicator

A radio button with an inner dot indicator. Supports a disabled state, custom sizes, and separate colors for selected / unselected states.

Usage

import { Radio } from 'rn-neo';
import { useState } from 'react';

const [selected, setSelected] = useState(false);

<Radio selected={selected} onChange={setSelected} />

// With size and custom colors
<Radio
  selected={selected}
  onChange={setSelected}
  size="lg"
  backgroundColor={{ true: 'secondary', false: 'surface' }}
  innerColor={{ true: 'onSecondary', false: 'transparent' }}
/>

// Disabled
<Radio selected={selected} onChange={setSelected} disabled />

Building a Radio Group

Radio is a controlled primitive — it does not manage group state. Wire up multiple buttons manually:

const [value, setValue] = useState('a');

<Radio selected={value === 'a'} onChange={() => setValue('a')} />
<Radio selected={value === 'b'} onChange={() => setValue('b')} />
<Radio selected={value === 'c'} onChange={() => setValue('c')} />

Behavior

  • The inner dot scales from 0 to 1 when selected switches — a clean pop-in.
  • The dot size derives from the container minus padding; its radius scales with the container's radius.
  • The shadow offset multiplier doubles () when selected.
  • When disabled, it renders at reduced opacity and ignores interactions.
  • Background / shadow / opacity transitions animate when animation is enabled.
  • padding defaults to the size preset value if not set explicitly.

Size

SizeDimensionsDefault Padding
sm18 × 18sm (4px)
md22 × 22md (8px)
lg28 × 28md (8px)

Props

Radio

PropTypeDefaultDescription
selectedbooleanRequiredCurrent selected state.
onChange(selected: boolean) => voidRequiredCalled with the new value on press.
disabledbooleanDisables interaction and reduces opacity.
size'sm' | 'md' | 'lg''md'Controls the dimensions of the radio button.
backgroundColorRecord<'true' | 'false', BgColors | string>{ true: 'primary', false: 'surface' }Background color for each state.
innerColorRecord<'true' | 'false', Colors | string>{ true: 'onPrimary', false: 'transparent' }Inner dot color for each state.

Border

PropTypeDefaultDescription
borderbooleanFrom themeWhether to show a border.
borderSizeBorderSize | numberFrom themeBorder width. Token or raw number.
borderColorColors | stringFrom themeBorder color.
radiusRadius | numberFrom themeBorder radius. Scales to the inner dot proportionally.

Shadow

PropTypeDefaultDescription
shadowbooleanFrom themeWhether to show a shadow.
shadowSizeShadowSize | numberFrom themeShadow offset size. Doubles when selected.
shadowColorColors | stringFrom themeShadow color.

Spacing

Accepts all standard spacing props (padding*, margin*); padding defaults to the size preset. See Box → Spacing for the full list.

Accessibility

Radio sets accessibilityRole="radio" and passes selected and disabled to accessibilityState automatically.

On this page