Form Components
checkbox-group
Overview
The checkbox-group
component is a UI component that allows users to select multiple options from a list.
It manages a group of checkboxes and their states.
Version | 2.0.1 |
Install (React) | npm install @nylas/react |
Import (React) | import { CheckboxGroup } from '@nylas/react'; |
Import (CDN) | You do not need to individually import the component, just import the parent component either nylas-scheduling or nylas-scheduler-editor . |
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
direction | The layout direction of the checkboxes. ‘vertical’ - checkboxes are stacked vertically (default) ‘horizontal’ - checkboxes are arranged horizontally | "horizontal" | "vertical" | 'vertical' | |
label | The label for the checkbox group. | string | '' | |
name | The name of the checkbox group. This is used to identify the group when submitting a form. | string | 'checkbox-group' | |
options | Array of options to display as checkboxes. Each option should have a label and value. | CheckboxOption[] | [] | |
required | Whether the checkbox group is required. If true, at least one checkbox must be checked when submitting a form. | boolean | false |
Events
Event | Description | Type |
---|---|---|
nylasCheckboxGroupChanged | This event is fired when any checkbox in the group is toggled. | CustomEvent<{ selectedValues: string[]; name: string; }> |
Built with StencilJS