RadioGroup

Single-select list of options.

A single-select list of options.

Installation

RadioGroup ships with the library — no separate install.

import { RadioGroup } from 'panelui-native';

Usage

<RadioGroup value={plan} onValueChange={setPlan}>
  <RadioGroup.Item value="free" label="Free — $0/month" />
  <RadioGroup.Item value="pro" label="Pro — $12/month" />
  <RadioGroup.Item value="team" label="Team — $36/month" />
</RadioGroup>

Composition

<RadioGroup>
  <RadioGroup.Item value="…" label="…" />
</RadioGroup>
  • RadioGroup.Item — One option. value identifies it, label is what is shown.

API Reference

RadioGroup

PropTypeDefaultDescription
classNamestring
valuestring
onValueChange(value: string) => void
disabledboolean

RadioGroup.Item

PropTypeDefaultDescription
classNamestring
valuestring
labelstring
disabledboolean

Every part also accepts the underlying React Native props (ViewProps or TextProps) and a className for Tailwind utilities.

On this page