RadioGroup

RadioGroups are used to group and manage radio controls.

Example

API

Learn more about the properties and the customization points.

Usage

import RadioGroup from "@sonnat/ui/RadioGroup";
//or
import { RadioGroup } from "@sonnat/ui";

Properties

Note that the documentation avoids mentioning all the native props (there are a lot) in this section of the components.

RadioGroup Properties
NameTypeDefaultDescription
childrennode-The content of the group.
classNamestring-Append to the class names applied to the component so you can override or extend the styles.
valuestring-The value of the selected radio.
defaultValuestring-The default value. Use when the component is not controlled.
layoutDirection"row" | "column""column"The layout direction of the group.
onChangefunction-The callback fires when a radio has selected.
Signature: function(selectedValues: string[]) => void
  • The ref is forwarded to the root element.
  • Any other properties supplied will be provided to the root element.