Skip to content

Using the Scheduler Editor component

The Scheduler Editor component lets your users access the Scheduler Editor from your project, so they can create and manage Configurations.

The Scheduler Editor component displaying the Event Info tab. The Event Title field is filled with example data.

This page explains how to handle authentication, embed the component, and customize it.

Nylas offers the Scheduler Editor component as a pre-built, extensible web- (HTML/Vanilla JS) and React-based UI component. After you add it to your project, organizers can use the Scheduler Editor to create and customize Configurations from your application. Organizers can use the component to…

  • Configure events: Set titles, descriptions, durations, and locations.
  • Manage availability: Set working hours, time slots, and scheduling methods.
  • Manage participants: Add participants to bookings and set their availability.
  • Customize bookings: Customize booking forms and confirmation settings.
  • Style Scheduling Pages: Add your brand to your Scheduling Pages with custom logos and colors.

The Scheduler Editor component includes…

  • Custom event handlers that let you define specific logic or behavior for user actions.
  • Composable components that let you customize how each element is arranged and rendered in the UI.
  • Custom UI stylings that support CSS shadow parts for a higher level of customization.

The component supports two configuration modes: app and composable. By default, it’s set to app mode. In this mode, the Scheduling component renders all elements it contains, meaning you can embed the pre-built component in your project with minimal configuration. composable mode allows you to customize how the Scheduling component arranges and renders each element in the UI. In this mode, you can embed elements as standalone components.

For more information, see the Scheduler UI components references.

Before you can use the Scheduler Editor component, you need to…

Set up authentication with nylasSessionsConfig

Section titled “Set up authentication with nylasSessionsConfig”

To set up Hosted OAuth for the Scheduler Editor component, set the nylasSessionsConfig property.

Set up authentication with nylasApiRequest

Section titled “Set up authentication with nylasApiRequest”

Before you can use nylasApiRequest, you need to download the latest version of the Nylas Identity package.

You have two options for setting up authentication using nylasApiRequest:

Set up authentication with NylasIdentityRequestWrapper

Section titled “Set up authentication with NylasIdentityRequestWrapper”

You must have an existing Hosted OAuth flow in your Nylas application to use this method.

You can use nylasApiRequest with the NylasIdentityRequestWrapper to configure the Scheduler Editor component with your existing Hosted OAuth details.

Set up authentication with CustomIdentityRequestWrapper

Section titled “Set up authentication with CustomIdentityRequestWrapper”

If you want to use your existing Bring Your Own (BYO) authentication configuration or a different HTTP library to authenticate users, you can set up the CustomIdentityRequestWrapper. This implements nylasApiRequest.

The Scheduler Editor component and CustomIdentityRequestWrapper require an access token from the same origin. Follow the steps in Creating grants with OAuth and an access token and set the redirect_uri to https://127.0.0.1:3000/scheduler-editor to generate the access token.

Once you have an access token, you can use it in CustomIdentityRequestWrapper and the Scheduler Editor component. Make sure that CustomIdentityRequestWrapper has a currentUser function that returns the email address associated with the access token.

To embed the Scheduler Editor in your project, import the NylasSchedulerEditor component and configure it to suit your needs.

Once it’s embedded, organizers can use the Scheduler Editor component to create and customize Configurations within your application. If you prefer to create Configurations manually, see Create Configuration with Scheduler API.

The Scheduler Editor component includes many customization options — the following sections cover a few. For more options, see the NylasSchedulerEditor component references.

Scheduler’s event handlers respond to user actions and control the operations that follow. Each event handler is associated with a specific type of event (for example, formSubmitted or previewButtonClicked).

You can use the eventOverrides property to customize the default event handlers to use specific logic or behaviors. For example, you can add or remove steps in your booking flow, track user interactions for analytics, update the available time slots when the user selects a date, and much more.

This example defines custom logic to perform after the schedulerConfigChanged event is triggered.

This event is triggered when the user takes an action, and it makes a call to the Scheduler APIs. For example, when a user clicks Create to create a Scheduling Page, the event is triggered and the handler makes a Create Configuration request.

You can set the configurationId to point to a specific Configuration. This disables the Scheduling Page Manager view and loads the Edit view for the specified Scheduling Page.

You can set schedulerPreviewLink to either config.id or slug to configure the Preview button in the Scheduling Page Manager view. When an organizer clicks the Preview button, they can view their Scheduling Page.

You can use the composable mode to customize how the Scheduler Editor component renders each element. When you use composable mode, you add elements under the nylas-scheduler-editor tag rather than wrapping them with nylas-editor-tabs.

The following example removes the default navigation tabs, and displays the calendar picker and availability picker elements in a single view.