--- title: Radio sidebar_position: 7 sidebar_custom_props: icon: TbCircleDot --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import { SandpackEditor} from '@site/src/ui/SandpackEditor' import radioCode from '!!raw-loader!@site/src/ui/input/components/radioCode.js' import radioGroupCode from '!!raw-loader!@site/src/ui/input/components/radioGroupCode.js' Used when users may only choose one option from a series of options.
Props Type Description Default
style `React.CSS` properties Additional inline styles for the component
className string Optional CSS class for additional styling
checked boolean Indicates whether the radio button is checked
value string The label or text associated with the radio button
onChange function The function called when the selected radio button is changed
onCheckedChange function The function called when the `checked` state of the radio button changes
size string The size of the radio button. Options include: `large` and `small` small
disabled boolean If `true`, the radio button is disabled and not clickable false
labelPosition string The position of the label text relative to the radio button. Has two options: `left` and `right` right
## Radio Group Groups together related radio buttons.
Props Type Description
value string The value of the currently selected radio button
onChange function The callback function triggered when the radio button is changed
onValueChange function The callback function triggered when the selected value in the group changes.
children `React.ReactNode` Allows you to pass React components (such as Radio) as children to the Radio Group