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.

Version1.1.4
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

PropertyAttributeDescriptionTypeDefault
checkedThe default value of the checkbox. This is the value that is displayed when the checkbox is rendered.boolean | undefinedundefined
labelThe label of the checkbox. This is displayed next to the checkbox.string''
nameThe name of the checkbox. This is used to identify the checkbox when submitting a form.string'checkbox'
requiredWhether 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.booleanfalse

Events

EventDescriptionType
nylasFormCheckboxToggledThis event is fired when the checkbox is toggled.CustomEvent<{ checked: boolean; name: string; label: string; }>

Graph


Built with StencilJS