RadioGroup
A set of mutually exclusive options.
Import
import { RadioGroup } from "@tarve/core";Usage
import { RadioGroup } from "@tarve/core";
let plan = "pro";
<RadioGroup
value={plan}
options={[
{ value: "free", label: "Free" },
{ value: "pro", label: "Pro" },
{ value: "team", label: "Team", disabled: true },
]}
onValueChange={(value) => {
plan = value;
}}
/>Props
| Prop | Type | Default |
|---|---|---|
options required | RadioOption[] | — |
value required | string | — |
disabled | boolean | — |
onValueChange | (value: string) => void | — |
orientation | "horizontal" | "vertical" | "vertical" |
Common props
Shared by every component. See descriptions →
childrenhighlightidkeymotionFromonHighlightonPasteonTransitionEndrovingGroupstyleTypes
interface RadioOption { value: string; label: string; disabled?: boolean }