Refers to the id of the element that labels the radio element.
Radio
Radios are used when only one choice may be selected in a series of options.
Props#
aria-describedby
aria-describedbystringcolorScheme
colorSchemeThe visual color appearance of the component
"whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"bluedata-radiogroup
data-radiogroupanydefaultChecked
defaultCheckedIf true, the radio will be initially checked.
booleanid
idid assigned to input
stringinputProps
inputPropsAdditional props to be forwarded to the input element
InputHTMLAttributes<HTMLInputElement>isChecked
isCheckedIf true, the radio will be checked.
You'll need to pass onChange to update its value (since it is now controlled)
booleanisDisabled
isDisabledIf true, the radio will be disabled
booleanisFocusable
isFocusableIf true and isDisabled is true, the radio will remain
focusable but not interactive.
booleanisInvalid
isInvalidIf true, the radio button will be invalid. This also sets `aria-invalid` to true.
booleanisReadOnly
isReadOnlyIf true, the radio will be read-only
booleanisRequired
isRequiredIf true, the radio button will be required. This also sets `aria-required` to true.
booleanname
nameThe name of the input field in a radio (Useful for form submission).
stringonChange
onChangeFunction called when checked state of the input changes
(event: ChangeEvent<HTMLInputElement>) => voidsize
sizeThe size of the Radio
"md" | "lg" | "sm"mdspacing
spacingThe spacing between the checkbox and its label text
ResponsiveValue<string | number | (string & {})>0.5remvalue
valueThe value to be used in the radio button. This is the value that will be returned on form submission.
stringvariant
variantThe variant of the Radio
stringProps#
aria-describedby
aria-describedbyRefers to the id of the element that labels the radio element.
stringcolorScheme
colorSchemeThe visual color appearance of the component
"whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"bluedata-radiogroup
data-radiogroupanydefaultChecked
defaultCheckedIf true, the radio will be initially checked.
booleanid
idid assigned to input
stringinputProps
inputPropsAdditional props to be forwarded to the input element
InputHTMLAttributes<HTMLInputElement>isChecked
isCheckedIf true, the radio will be checked.
You'll need to pass onChange to update its value (since it is now controlled)
booleanisDisabled
isDisabledIf true, the radio will be disabled
booleanisFocusable
isFocusableIf true and isDisabled is true, the radio will remain
focusable but not interactive.
booleanisInvalid
isInvalidIf true, the radio button will be invalid. This also sets `aria-invalid` to true.
booleanisReadOnly
isReadOnlyIf true, the radio will be read-only
booleanisRequired
isRequiredIf true, the radio button will be required. This also sets `aria-required` to true.
booleanname
nameThe name of the input field in a radio (Useful for form submission).
stringonChange
onChangeFunction called when checked state of the input changes
(event: ChangeEvent<HTMLInputElement>) => voidsize
sizeThe size of the Radio
"md" | "lg" | "sm"mdspacing
spacingThe spacing between the checkbox and its label text
ResponsiveValue<string | number | (string & {})>0.5remvalue
valueThe value to be used in the radio button. This is the value that will be returned on form submission.
stringvariant
variantThe variant of the Radio
string