Skip to content
Nylas components are currently in private preview. They might contain bugs or errors, and might change considerably before they reach general availability (GA).

Scheduler editor component

The NylasSchedulerEditor component is a form that allows users to configure the settings for the Nylas Scheduler.

Using the NylasSchedulerEditor component

import React from "react";
import { NylasSchedulerEditor } from "@nylas/react";
function App() {
return (
<NylasSchedulerEditor
// Authentication configuration
nylasSessionsConfig={{
clientId: "<NYLAS_CLIENT_ID>",
redirectUri: `${window.location.origin}/scheduler-editor`,
domain: "https://api.us.nylas.com/v3",
hosted: true,
accessType: 'offline'
}}
// Enable different event types
enableEventTypes={{
one_on_one: true,
collective: true,
max_fairness: true,
max_availability: true,
group: true
}}
// Add Zoom conferencing support
conferenceProviders={{
'zoom': '<NYLAS_GRANT_ID>'
}}
// Customize localization
localization={{
en: {
availabilityTab: 'Open Slots',
nextButton: 'Continue'
}
}}
// Enable user feedback
enableUserFeedback={true}
// Show Nylas branding
nylasBranding={true}
// Event handlers
eventOverrides={{
schedulerConfigChanged: async (event: { type: string; data: unknown }) => {
console.log('Scheduler config changed:', event);
}
}}
/>
);
}
export default App;

NylasScheduling Properties

additionalParticipants?

NameadditionalParticipants
DescriptionThis prop is used to populate the additional participants and their availability in the scheduler editor.
TypeAdditionalParticipant[]

conferenceProviders?

NameconferenceProviders
DescriptionThis prop will be used to populate the conference provider options in the editor. The key is the provider name (‘zoom’) and the value is the grant id. We currently support same provider (‘google’, ‘microsoft’) for all participants and ‘zoom’ for cross-provider conferencing.
TypeRecord<string, string>

configurationId?

NameconfigurationId
Description* The configuration id to use for the scheduler editor. If provided, then the scheduler editor will try and fetch the configuration with the provided id. If found, it will automatically load the editor with the configuration settings for editing.
Typestring

defaultAuthArgs?

NamedefaultAuthArgs
DescriptionThe default authentication arguments to use when authenticating a user.
TypeAuthArgs[]

defaultLanguage?

NamedefaultLanguage
DescriptionThis prop will allow to set a default language for the Nylas scheduling page.
TypeLANGUAGE_CODE

defaultSchedulerConfigState?

NamedefaultSchedulerConfigState
DescriptionThe default scheduler config store state. Used to set the initial state of the scheduler config store. This state can be used to pass defaults to newly created configurations.
TypePartial<NylasSchedulerConfigStoreState>

enableEventTypes?

NameenableEventTypes
DescriptionControls which event types are enabled in the Scheduler. - By default, all event types are enabled and users will see a selection screen when creating a new event. - You can disable specific event types by setting them to `false`. - At least one event type must remain enabled at all times. - If only one event type is enabled, the event type selection screen will be skipped.
TypeEnableEventTypes
default{ one_on_one: true, collective: true, max_fairness: true, max_availability: true, group: true, }

enableUserFeedback?

NameenableUserFeedback
DescriptionIndicates if the user feedback feature is enabled. By default, this is set to true. When enabled, the user feedback feature will be available in the edit mode. To disable the user feedback feature, set this prop to false.
Typeboolean
defaulttrue

eventOverrides?

NameeventOverrides
DescriptionThis provides a way to override the default event handlers.
TypeSchedulerEditorEventOverride
default{}

experimentalFeatures?

NameexperimentalFeatures
DescriptionThis prop is to opt in to experimental features. Ex: { ‘group_events’: true }
TypeRecord<EXPERIMENTAL_FEATURES, boolean>

hideEditorTabs?

NamehideEditorTabs
DescriptionThis optional prop is used to hide tabs in the editor. Available tabs are: eventInfo, availability, participants, bookingOptions, bookingForm
TypeTab[]
default[]

localization?

Namelocalization
DescriptionThis prop will allow to override the default localization strings for each language. Nylas scheduling pages currently support the following language codes: en, es, fr, de, sv, zh, ja, nl.
TypePartial<Record<LANGUAGE_CODE, Locale>>

mode?

Namemode
DescriptionThis is used to set the mode for the scheduler config. The mode can be ‘app’ or ‘composable’. The default mode is ‘app’.
Type’app’ | ‘composable’
default’app’

nylasApiRequest?

NamenylasApiRequest
DescriptionThe Nylas Api Request instance. Used to make requests to the Nylas API.
TypeNylasApiRequest

nylasBranding?

NamenylasBranding
DescriptionThis prop will allow to show / hide the option to manage Nylas branding in the email template. By default, this is set to true. When enabled, the option to show/hide Nylas branding will be shown in the email template. To disable the option to show/hide Nylas branding, set this prop to false.
Typeboolean
defaulttrue

nylasSessionsConfig?

NamenylasSessionsConfig
DescriptionThe Nylas Sessions configuration. Used to configure the Nylas Sessions instance.
TypeConfig

requiresSlug?

NamerequiresSlug
DescriptionIndicates if a slug is required for the configuration. When set to true, the user must enter a slug when creating or editing a configuration. The slug is used for hosted pages. If using Nylas hosted scheduling pages, the `schedulerPreviewLink` prop can be set to redirect to a public configuration as follows: `https://book.nylas.com/us/&lt;YOUR_NYLAS_APP_CLIENT_ID&gt;/&#123;slug&#125;&#96;. `us` denotes the region. Replace it with the appropriate region of your application. Replace `<YOUR_NYLAS_APP_CLIENT_ID>` with your Nylas app client ID. The `{slug}` placeholder is replaced with the appropriate slug when the scheduler preview button is clicked. Note: Nylas hosted scheduling pages are only available for public configurations.
Typeboolean
defaultfalse
NameschedulerPreviewLink
DescriptionThe scheduler preview link used when the user clicks the preview button. If `requiresSlug` is true, you can use the placeholder `{slug}` to insert the slug in the link for Nylas hosted scheduling pages. Additionally, you can use the placeholder `{config.id}` to insert the configuration ID anywhere in the link. For example: `https://book.nylas.com/us/&lt;YOUR_NYLAS_APP_CLIENT_ID&gt;/&#123;slug&#125;&#96;. `us` denotes the region. Replace it with the appropriate region of your application. Replace `<YOUR_NYLAS_APP_CLIENT_ID>` with your Nylas app client ID. Note: Nylas hosted scheduling pages are only available for public configurations.
Typestring
default

NylasScheduling Slots

SlotDescription
custom-page-style-inputsThis slot is used in “app” mode to pass a custom page style form to the nylas-page-styling component.
login-requiredThis slot is used to display a message when the user is not logged in.

NylasScheduling Events

EventDescription
initThis event is fired when the provider is initialized. By default, this event handles determining if the user is logged in or not. In addition, it fetches the provided configuration if a valid configuration id is provided.
loggedInThis event is fired when the the NylasAuth isAuthenticated state changes to true.
loggedOutThis event is fired when the the NylasAuth isAuthenticated state changes to false.
schedulerConfigCloseClickedThis event is fired when the close button on scheduler config is clicked.

NylasScheduling CSS Parts

PartDescription
nse__close-buttonThe close button of the scheduler editor. Use this part to hide the close button.
nse__contentThe content of the scheduler editor. Use this part to adjust the height of the editor.
nse__headerThe header of the scheduler editor.
nse__language
nse__list-configurationsThe list of configurations. Use this part to adjust the height of the list.
nse__login-requiredThe login required component.
nse__login-required-cardThe card of the login required component.
nse__login-required-disclaimer-textThe icon of the login required component.
nse__login-required-google-buttonThe Google button of the login required component.
nse__login-required-microsoft-buttonThe Microsoft button of the login required component.
nse__login-required-other-provider-buttonThe other provider button of the login required component.
nse__login-required-textThe text of the login required component.
nse__titleThe title of the scheduler editor.