Radio

An easily stylable radio button component.

Best apple

API reference

Radio is always placed within Radio Group. Import the components and place them together:

Anatomy
import { Radio } from '@base-ui-components/react/radio';
import { RadioGroup } from '@base-ui-components/react/radio-group';

<RadioGroup>
  <Radio.Root>
    <Radio.Indicator />
  </Radio.Root>
</RadioGroup>
PropTypeDefault
classNamestring | (state) => stringundefined
defaultValueanyundefined
disabledbooleanfalse
namestringundefined
onValueChange(value, event) => voidundefined
readOnlybooleanfalse
render| React.ReactElement
| (props, state) => React.ReactElement
undefined
requiredbooleanfalse
valueanyundefined
Attribute
Description
data-disabled

Root

Represents the radio button itself. Renders a <button> element and a hidden <input> beside.

PropTypeDefault
classNamestring | (state) => stringundefined
disabledbooleanfalse
readOnlybooleanfalse
render| React.ReactElement
| (props, state) => React.ReactElement
undefined
requiredbooleanfalse
valueanyundefined
Attribute
Description
data-checked
data-dirty
data-disabled
data-invalid
data-readonly
data-required
data-touched
data-unchecked
data-valid

Indicator

Indicates whether the radio button is selected. Renders a <span> element.

PropTypeDefault
classNamestring | (state) => stringundefined
keepMountedbooleantrue
render| React.ReactElement
| (props, state) => React.ReactElement
undefined
Attribute
Description
data-checked
data-dirty
data-disabled
data-invalid
data-readonly
data-required
data-touched
data-unchecked
data-valid