RadioGroup
Overview
A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time.
Properties
Properties | Description |
---|---|
children | The Children prop allows users to pass other components as a property, enabling users to compose together components. |
defaultValue | The value of the radio item that should be checked when initially rendered. Use when you do not need to control the state of the radio items. |
value | The controlled value of the radio item to check. Should be used in conjunction with onValueChange. |
onValueChange | Event handler called when the value changes. |
name | The name of the group. Submitted with its owning form as part of a name/value pair. |
required | When true, indicates that the user must check a radio item before the owning form can be submitted. |
orientation | The orientation of the component. |
dir | The reading direction of the radio group. If omitted, inherits globally from DirectionProvider or assumes LTR (left-to-right) reading mode. |
loop | When true, keyboard navigation will loop from last item to first, and vice versa. |
className | The className property can be used to add a CSS class to a component that accepts styling. In Clutch, the className property powers the visual styling panel and the class name itself is auto-generated. Additional class names can be passed to the component by twirling open the className control and passing in strings. |
Updated 6 months ago