Radio

Radio UI Component

Demo

API

Props

Radio

PropertyDescriptionTypeDefault
autoFocusget focus when component mountedbooleanfalse
checkedSpecifies whether the radio is selected.boolean-
descriptionradion input descriptionstring-
defaultCheckedSpecifies the initial state: whether or not the radio is selected.booleanfalse
disabledDisable radiobooleanfalse
valueAccording to value for comparison, to determine whether the selectedany-

RadioGroup

PropertyDescriptionTypeDefault
defaultValueDefault selected valueany-
disabledDisable all radio buttonsbooleanfalse
nameThe name property of all input[type="radio"] childrenstring-
optionsset children optionalstring[] / Array<{ label: string value: string disabled?: boolean }>-
sizesize for radio button stylelarge / default / smalldefault
valueUsed for setting the currently selected value.any-
onChangeThe callback function that is triggered when the state changes.(e:Event) => void-
buttonStylestyle type of radio buttonoutline / solidoutline

Methods

Radio

NameDescription
blur()remove focus
focus()get focus