Mobile › Inputs

RadioGroup

One choice from a short list, each option with an optional description.

Installation

npx expo install plankui-mobile react-native-safe-area-context expo-haptics

Usage

import { RadioGroup } from "plankui-mobile";

const [plan, setPlan] = useState("team");

<RadioGroup
  accessibilityLabel="Plan"
  value={plan}
  onChange={setPlan}
  options={[
    { value: "solo", label: "Solo", description: "One person" },
    { value: "team", label: "Team", description: "Up to 10 people" },
  ]}
/>

iOS and Android

iOS: Rows with a check mark on the chosen one, as in Settings.

Android: Material 3 radio buttons with a 20 dp ring.

API reference

PropTypeDefaultDescription
options{ value; label; description? }[]The choices.
valuestringThe selected value.
onChange(v: string) => voidCalled with the chosen value.
accessibilityLabelstring–Names the group for screen readers.