nylas-timeslot-picker

Overview

The nylas-timeslot-picker component is a UI component that allows users to select a timeslot from a list of available timeslots.

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

Example


Properties

PropertyAttributeDescriptionTypeDefault
availabilityThe available timeslots.AvailabilityTimeslot[] | undefinedundefined
isLoadingloading-stateThe loading state prop. Used to display loading state when fetching availability.boolean | undefinedundefined
selectedDateThe selected date.Date | undefinednew Date()
selectedTimeslotThe selected timeslot.undefined | { start_time: Date; end_time: Date; }undefined
selectedTimezoneselected-timezoneThe selected timezone.stringIntl.DateTimeFormat().resolvedOptions().timeZone

Events

EventDescriptionType
timeslotConfirmedThis event is fired when a timeslot is confirmed. By default, this will proceed to the booking form page.CustomEvent<{ start_time: Date; end_time: Date; }>
timeslotSelectedThis event is fired when a timeslot is selected.CustomEvent<{ start_time: Date; end_time: Date; }>

Slots

SlotDescription
"timeslot-picker-cta-label"The label for the timeslot picker CTA. Default is “Next”.

Shadow Parts

PartDescription
"ntp"The timeslot picker component.
"ntp__button-primary"The timeslot picker CTA.
"ntp__timeslot"The timeslot button.
"ntp__timeslot--selected"The selected timeslot button.

Graph


Built with StencilJS