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.

Version1.1.4
Install (React)npm install @nylas/react
Import (React)import { RadioButtonGroup } from '@nylas/react';
Import (CDN)<script type="module"> import { defineCustomElement } from "https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/radio-button-group/radio-button-group.es.js"; defineCustomElement(); </script>

Properties

PropertyAttributeDescriptionTypeDefault
defaultSelectedValueThe default selected value of the radio group.string''
labelThe 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 | undefinedundefined
nameThe name of the radio group. This is used to identify the radio group when submitting a form.string'radio-group'
optionsThe 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; }[][]
requiredWhether 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.booleanfalse

Events

EventDescriptionType
nylasFormRadioChangedThis event is fired when the selected value changes.CustomEvent<{ value: string; name: string; label?: string | undefined; }>

Graph


Built with StencilJS