# Upstage Design System — RadioGroup (product)

- context: product · group: forms
- source revision: lift-1.2.3 (Lift 1.2.3, zip sha256 8d5d9377c2b4…)
- status: content source-derived · availability implemented · verification static-only
- human docs: /ko/components/product/radiogroup/ · machine doc: /agent/components/product/radiogroup.md

## Required references (read these)
- /components/forms/RadioGroup.jsx — implementation · sha256 01dd3a6daa3d…
- /components/_types.d.ts — api · key RadioGroupProps
- /components/forms/RadioGroup.prompt.md — usage-note · sha256 de5b7d5be37e…
- /kit/rules/a11y-contract.json — a11y · key RadioGroup

## API (components/_types.d.ts RadioGroupProps)
- name?: string
- options?: Array<string | RadioOption> (default [])
- value?: string
- defaultValue?: string
- onChange?: (value: string) => void
- label?: React.ReactNode
- description?: React.ReactNode
- orientation?: "vertical" | "horizontal" (default vertical)
- disabled?: boolean (default false)
- style?: React.CSSProperties

## Accessibility contract
- keys: ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Space
- aria: role=radiogroup, role=radio, aria-checked
- notes: roving tabindex — 선택된 항목만 탭 순서에 있다

## Unverified
- Browser behaviour is not verified here (static source check only).

## Usage note (original, KO)

Mutually exclusive choice, 2–5 options. Arrow keys move and select; only the checked radio is tabbable. Pass `name` when it must post inside a native form.



6개 이상이면 Select, 다중 선택이면 Checkbox.

## 패키지·Kit 연동 계약

단일 선택 라디오는 원형 외곽선 안에 원형 점을 표시한다. Checkbox의 체크 표시와 혼용하지 않는다.
JSX 참고 구현과 Kit의 TSX 스냅샷은 별개이므로 양쪽을 확인한다.

- `@upstageai/ui` 1.2.1·2.1.0과 Kit vendor-patch-1에는 `Check`에 `fill-primary`가 남아 선택 표시가 쐐기처럼 채워지는 결함이 확인됐다. 버전 업만으로 수정됐다고 가정하지 말고 설치된 배포물의 렌더링을 확인한다.
- 아이콘 교체 시 `fill`·`stroke`·viewBox·크기를 같이 검토한다. Lucide의 선형 Check에는 면 채우기를 적용하지 않는다. Circle의 면 채우기는 의도된 점 표현이다.
- 최신 shadcn Radix 라디오는 작은 그림자를 사용하지만 필수 상호작용은 아니다. 패키지·Kit은 가장 얕은 Lift `shadow-sm`, 현재 JSX 참고 구현은 무그림자다. 이름이 같은 `shadow`라도 Tailwind 버전과 소비 앱 토큰에 따라 깊이가 달라지므로 실제 계산값을 검증한다.
- 소비 앱 CSS에서 `[data-state="checked"]`만 전역 지정하면 radio·switch·checkbox에 모두 영향을 준다. 체크박스 보정은 `[role="checkbox"]`로 제한한다.
- 선택·미선택·비활성, 밝은/어두운 테마, 클릭과 화살표 키를 실제 배포 패키지와 소비 앱 CSS로 검증한다. 잘못된 구버전과 화면이 같다는 사실은 정답의 근거가 아니다.

## Examples (from the usage note)

```jsx
<RadioGroup label="배포 환경" defaultValue="prod"
  options={[{value:"prod",label:"Production",description:"실사용 트래픽"},{value:"stage",label:"Staging"}]}
  onChange={setEnv} />
```
