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
name

string

undefined

defaultValue

any

undefined

value

any

undefined

onValueChange

(value, event) => void

undefined

disabled

boolean

false

readOnly

boolean

false

required

boolean

false

className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

Attribute
Description
data-disabled

Root

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

PropTypeDefault
value

any

undefined

disabled

boolean

false

readOnly

boolean

false

required

boolean

false

className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

Attribute
Description
data-checked
data-unchecked
data-disabled
data-readonly
data-required
data-valid
data-invalid
data-dirty
data-touched

Indicator

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

PropTypeDefault
className

string | (state) => string

undefined

keepMounted

boolean

true

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

Attribute
Description
data-checked
data-unchecked
data-disabled
data-readonly
data-required
data-valid
data-invalid
data-dirty
data-touched