Form Components
checkbox-component
Overview
The checkbox-component
component is a UI component that allows users to select a checkbox.
This component is used in the scheduling form to input checkbox type inputs.
Version | 1.1.0 |
Install (React) | npm install @nylas/react |
Import (React) | import { CheckboxComponent } from '@nylas/react'; |
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
checked | checked | The default value of the checkbox. This is the value that is displayed when the checkbox is rendered. | boolean | undefined | undefined |
label | label | The label of the checkbox. This is displayed next to the checkbox. | string | '' |
name | name | The name of the checkbox. This is used to identify the checkbox when submitting a form. | string | 'checkbox' |
required | required | Whether the checkbox is required. If true, the checkbox must be checked when submitting a form. Default is false. If the checkbox is required and not checked, an error message is displayed. | boolean | false |
Events
Event | Description | Type |
---|---|---|
nylasFormCheckboxToggled | This event is fired when the checkbox is toggled. | CustomEvent<{ checked: boolean; name: string; label: string; }> |
Graph
Built with StencilJS