UNPKG

@momentum-ui/react-collaboration

Version:

Cisco Momentum UI Framework for React Collaboration Applications

32 lines (26 loc) 3.58 kB
The `<RadioGroup />` component. Options for the component can either be specified in two ways: - Passing an array of `RadioProps` to the options prop. - Passing an array of strings to the options prop. The string is used for both the label and the value of the button. The props for `RadioProps` are: | Prop | Type | Description | | ---------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | | style | `cssProperties` | The CSS properties for the radio button. | | className | `string` | The classname to use for the radio button. | | value | `string` | The value of the radio button, used when submitting an HTML form. See MDN. | | label | `string` | The label for the Radio button. | | isDisabled | `boolean` | Whether the radio button is disabled or not. Shows that a selection exists, but is not available in that circumstance. | | autoFocus | `boolean` | Whether the element should receive focus on render. | | onFocus | `(e: FocusEvent) => void` | Handler that is called when the element receives focus. | | onBlur | `(e: FocusEvent) => void` | Handler that is called when the element loses focus. | | onFocusChange | `(isFocused: boolean) => void` | Handler that is called when the element's focus status changes. | | onKeyDown | `(e: KeyboardEvent) => void` | Handler that is called when a key is pressed. | | onKeyUp | `(e: KeyboardEvent) => void` | Handler that is called when a key is released. | | id | `string` | The element's unique identifier. See MDN. | | aria-label | `string` | Defines a string value that labels the current element. | | aria-labelledby | `string` | Identifies the element (or elements) that labels the current element. | | aria-describedby | `string` | Identifies the element (or elements) that describes the object. | | aria-details | `string` | Identifies the element (or elements) that provide a detailed, extended description for the object | Extended `AriaRadioProps`. See [React aria useRadioGroup](https://react-spectrum.adobe.com/react-aria/useRadioGroup.html)