Skip to content

RadioGroup API

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

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

Props

Name Type Default Description
children node The content of the component.
defaultValue any The default input element value. Use when the component is not controlled.
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 string Value of the selected radio button.

The ref is forwarded to the root element.

Any other props supplied will be provided to the root element (FormGroup).

Inheritance

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

Notes

The component can cause issues in StrictMode.

Demos