Radio

Radio는 여러 옵션 중 하나만 선택할 수 있는 입력 컴포넌트입니다. RadioGroup과 함께 사용하여 라디오 버튼 그룹을 구성할 수 있습니다.

Property


Size

RadioGroup의 크기를 설정합니다.

Disabled

RadioGroup의 비활성화 상태를 설정합니다.

Read Only

RadioGroup의 읽기 전용 상태입니다. 사용자가 값을 변경할 수 없지만 현재 선택된 상태를 확인할 수 있습니다.

Examples


Direction

Radio 그룹의 방향을 조절할 수 있습니다. VStack과 HStack을 사용하여 세로 및 가로 방향으로 배치할 수 있습니다.

Flexible

Radio의 유연한 사용예시입니다.

Props Table


RadioGroup.Root

Root of the RadioGroup compound component, which groups radios so only one can be selected at a time. Shares size and invalid with the radios inside it. Renders a <div> element.

PropDefaultType
size?
md
mdlg
defaultValue?
-
unknown
onValueChange?
-
function
value?
-
unknown
children?
-
ReactNode
className?
-
stringfunction
invalid?
-
boolean
style?
-
React.CSSPropertiesfunction
disabled?
false
boolean
form?
-
string
inputRef?
-
React.Ref<HTMLInputElement>
name?
-
string
readOnly?
false
boolean
required?
false
boolean
render?
-
ReactElementfunction

RadioGroup.Label

Visible label for the radio group, also used as the group's accessible name. Renders a <span> element.

PropDefaultType
children?
-
ReactNode
className?
-
stringfunction
style?
-
React.CSSPropertiesfunction
render?
-
ReactElementfunction

Radio.Root

Radio button for picking one option from a set. Use inside RadioGroup.Root. Renders a <span> element and a hidden <input> beside it.

PropDefaultType
value
-
unknown
invalid?
false
boolean
size?
md
mdlg
children?
-
ReactNode
className?
-
stringfunction
style?
-
React.CSSPropertiesfunction
disabled?
-
boolean
inputRef?
-
React.Ref<HTMLInputElement>
nativeButton?
false
boolean
readOnly?
-
boolean
required?
-
boolean
render?
-
ReactElementfunction

Radio.IndicatorPrimitive

Dot shown inside the radio while it is selected. Renders a <span> element.

PropDefaultType
className?
-
stringfunction
style?
-
React.CSSPropertiesfunction
keepMounted?
true
boolean
render?
-
ReactElementfunction

On this page