Radio

Provides single user input from a selection of options.

Import

import { Radio } from 'raw-ui';

Default

Checked

With label

Controlled

Disabled

Group

API

Radio

PropDescriptionTypeDefault
defaultCheckedselected or not by default (uncontrolled)booleanfalse
checkedselected or not (controlled)boolean-
valueunique identification value (only in group)string | number-
disableddisable current radiobooleanfalse
onChangechange event handler(event: React.ChangeEvent<HTMLInputElement>) => void-
...native propsReact.InputHTMLAttributes-

Radio.Group

PropDescriptionTypeDefault
defaultValuedefault selected items (uncontrolled)Array<string | number>-
valueselected items (controlled)Array<string | number>-
disableddisable all itemsbooleanfalse
layoutvertical layout'row' | 'column''row'
onChangechange event handler(value: Array<string | number>) => void-
...native propsReact.HTMLAttributes-