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.3.3 |
Install (React) | npm install @nylas/react |
Import (React) | import { CheckboxComponent } from '@nylas/react'; |
Import (CDN) | <script type="module">
import { defineCustomElement } from "https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/checkbox-component/checkbox-component.es.js";
defineCustomElement();
</script> |
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
checked | The default value of the checkbox. This is the value that is displayed when the checkbox is rendered. | boolean | undefined | undefined | |
label | The label of the checkbox. This is displayed next to the checkbox. | string | '' | |
name | The name of the checkbox. This is used to identify the checkbox when submitting a form. | string | 'checkbox' | |
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