@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
28 lines (27 loc) • 1.52 kB
JavaScript
'use client';
import { withWebComponent } from '@ui5/webcomponents-react-base';
/**
* The `RadioButton` component enables users to select a single option from a set of options.
* When a `RadioButton` is selected by the user, the
* `change` event is fired.
* When a `RadioButton` that is within a group is selected, the one
* that was previously selected gets automatically deselected. You can group radio buttons by using the `name` property.
*
* **Note:** If `RadioButton` is not part of a group, it can be selected once, but can not be deselected back.
*
* ### Keyboard Handling
*
* Once the `RadioButton` is on focus, it might be selected by pressing the Space and Enter keys.
*
* The Arrow Down/Arrow Up and Arrow Left/Arrow Right keys can be used to change selection between next/previous radio buttons in one group,
* while TAB and SHIFT + TAB can be used to enter or leave the radio button group.
*
* **Note:** On entering radio button group, the focus goes to the currently selected radio button.
*
*
*
* __Note:__ This is a UI5 Web Component! [RadioButton UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/RadioButton) | [Repository](https://github.com/UI5/webcomponents)
*/
const RadioButton = withWebComponent('ui5-radio-button', ['accessibleName', 'accessibleNameRef', 'name', 'text', 'value', 'valueState', 'wrappingType'], ['checked', 'disabled', 'readonly', 'required'], [], ['change']);
RadioButton.displayName = 'RadioButton';
export { RadioButton };