🎉 Material UI v4 is out now! Check out the announcement blog post →
RadioGroup

RadioGroup API

The API documentation of the RadioGroup React component. Learn more about the properties and the CSS customization points.

import RadioGroup from '@material-ui/core/RadioGroup';

Props

Name Type Default Description
children node The content of the component.
defaultValue union: string |
 number |
 bool
The default input value, useful when not controlling the component.
name string The name used to reference the value of the control.
onChange func Callback fired when a radio button is selected.

Signature:
function(event: object, value: string) => void
event: The event source of the callback. You can pull out the new value by accessing event.target.value.
value: The value of the selected radio button
value union: string |
 number |
 bool
Value of the selected radio button.

Any other properties supplied will be spread to the root element (FormGroup).

Inheritance

The properties of the FormGroup component are also available. You can take advantage of this behavior to target nested components.

Demos