Inputs
RadioGroup
여러 옵션 중 하나만 선택.
Compound API: RadioGroup + RadioGroup.Item. 항목 수가 5개 미만이고 모두 가시적으로 보여야 할 때. 그 이상은 Select.
import { RadioGroup } from "@nxtgen-org/react";
Basic
Compound API
복잡 태스크 · 추론.
균형잡힌 성능.
초고속 · 저비용.
tsx
const [model, setModel] = useState("opus");<RadioGroup value={model} onValueChange={setModel}><RadioGroup.Item value="opus" label="Opus 4.7" description="복잡 태스크 · 추론." /><RadioGroup.Item value="sonnet" label="Sonnet 4.6" description="균형잡힌 성능." /><RadioGroup.Item value="haiku" label="Haiku 4.5" description="초고속 · 저비용." /></RadioGroup>
API
| Name | Type | Default | Description |
|---|---|---|---|
| value | string | — | controlled 선택. |
| defaultValue | string | — | — |
| onValueChange | (value: string) => void | — | — |
| RadioGroup.Item | { value, label?, description?, disabled? } | — | — |