RadioGroup

size
direction
disabled
import {RadioGroup} from '@gravity-ui/uikit';

The RadioGroup component is used to create a group where users can select a single option from multiple choices.

Disabled state

Size

Use the size property to manage the RadioGroup size. The default size is m.

Direction

Use the direction property to manage the RadioGroup direction. The default direction is horizontal.

Properties

NameDescriptionTypeDefault
childrenThe content of the radio group.ReactNode
disabledToggles the disabled state of the radio group.booleanfalse
optionsOptions for radio group.RadioGroupOption[]
optionClassNameclass HTML attribute for the radio children.string
directionDetermines the direction of the radio group.horizontal - vertical"horizontal"
defaultValueSets the initial value state when the component is mounted.string
onUpdateFires when the user changes the radio state and provides the new value as a callback argument.(value: string) => void
onChangeFires when the user changes the radio state and provides the change event as a callback argument.Function
sizeDetermines the size of the radio group.m lm
qadata-qa HTML attribute, used for testingstring
stylestyle HTML attributeReact.CSSProperties
classNameclass HTML attributestring

RadioGroup.Option

The RadioGroup component also exports a nested Option component equivalent to Radio, which can be used to create radio options within the RadioGroup.

Properties

NameDescriptionTypeDefault
childrenThe content of the radio (usually, a label).ReactNode
contentThe content of the radio (alternative to children).ReactNode
disabledToggles the disabled state of the radio.booleanfalse
valueControl valuestring