Form Components

select-dropdown

Overview

The select-dropdown component is a dropdown that allows users to select an option from a list of options. This component is used in the scheduling form to input dropdown type inputs.

Version1.1.0
Install (React)npm install @nylas/react
Import (React)import { SelectDropdown } from '@nylas/react';

Properties

PropertyAttributeDescriptionTypeDefault
defaultSelectedOptionThe default selected optionDropdownOption | nullnull
dropdownButtonTextdropdown-button-textOverrides the select dropdown to be used as a button with dropdownButtonText representing actions & dropdownText name on the dropdown intead of selected valuestring | undefinedundefined
labellabelThe label for the dropdown, skipped if no label is providedstring | undefinedundefined
name (required)nameThe name of the dropdownstringundefined
optionsThe options to display in the dropdownDropdownOption[][]
pluralizedLabelpluralized-labelShow pluralized label for the selected option. This is s tring that is appended to the selected option label as a suffix.string''
requiredrequiredIf true, the dropdown is required for form submissionbooleanfalse
withChevronwith-chevronShould show chevron on buttonbooleantrue
withSearchwith-searchShould show search inputbooleantrue

Events

EventDescriptionType
nylasFormDropdownChangedThis event is fired when the selected option is changedCustomEvent<{ value: string; name: string; error?: string | undefined; label?: string | undefined; }>

Shadow Parts

PartDescription
"sd_dropdown"The dropdown container
"sd_dropdown-button"The dropdown button
"sd_dropdown-button-selected-label"The selected option label
"sd_dropdown-content"The dropdown content
"sd_dropdown-labelhtml"
"sd_dropdown_label"The dropdown label

Built with StencilJS