Form Components
radio-button-group
Overview
The radio-button-group
component is a UI component that allows users to select a single option from a list of options.
This component is used in the scheduling form to input radio button type inputs.
Version | 1.1.0 |
Install (React) | npm install @nylas/react |
Import (React) | import { RadioButtonGroup } from '@nylas/react'; |
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
defaultSelectedValue | default-selected-value | The default selected value of the radio group. | string | '' |
label | label | The label of the radio group. This is displayed above the radio group. Label is optional. You can also use the slot ‘label’ to add a label. | string | undefined | undefined |
name | name | The name of the radio group. This is used to identify the radio group when submitting a form. | string | 'radio-group' |
options | — | The list of options in the radio group. Each option has a label and a value and an optional description. | { label: string; value: string; description?: string | undefined; }[] | [] |
required | required | Whether the radio group is required. If true, the radio group must have a value when submitting a form. Default is false. If the radio group is required and the value is empty, an error message is displayed. | boolean | false |
Events
Event | Description | Type |
---|---|---|
nylasFormRadioChanged | This event is fired when the selected value changes. | CustomEvent<{ value: string; name: string; label?: string | undefined; }> |
Graph
Built with StencilJS