Skip to content

Components

Component library

The @flexischeduler/scheduling-components React library. 12 components covering display, input, and workflow surfaces, all pre-wired to the engine.

Key points

  • React 18+, TypeScript, fully tree-shakeable
  • Each component talks to the engine via a shared FlexiSchedulerProvider
  • Styled with Tailwind tokens; theme overridable via CSS variables
  • Pick the components you need — no requirement to use the whole library

Install

The library ships as a single npm package with all 12 components plus the provider:

npm install @flexischeduler/scheduling-components

# With your preferred package manager
yarn add @flexischeduler/scheduling-components
pnpm add @flexischeduler/scheduling-components

TypeScript types are included. Tree-shaking is enabled, so importing one component doesn’t pull the others into your bundle.

Provider setup

Wrap your app once in FlexiSchedulerProvider — it carries the engine connection (base URL, JWT token, organization ID) and shared state down to every component:

app/layout.tsxtypescript
// app/layout.tsx (Next.js) or app entry
import { FlexiSchedulerProvider } from '@flexischeduler/scheduling-components';

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <FlexiSchedulerProvider
          baseUrl={process.env.NEXT_PUBLIC_FLEXI_API_URL}
          token={getJwtToken}
          organizationId={process.env.NEXT_PUBLIC_FLEXI_ORG_ID}
        >
          {children}
        </FlexiSchedulerProvider>
      </body>
    </html>
  );
}

The token prop accepts either a string or a function that returns the current token. Use the function form when your tokens refresh through your IdP — the provider will call it on every request rather than caching a stale value.

Provider is required

Components rendered outside a FlexiSchedulerProvider will throw at mount. There’s no fallback mode — the provider isn’t optional.

Display components

Components that render scheduling state. Read-only by default; useful for dashboards, profiles, and timelines.

Input components

Components that capture user intent. Form-shaped surfaces wired to engine validation.

Workflow components

Components for queues, lists, and admin workflows. Designed for dispatcher and coordinator use cases.

Theming

Components use CSS variables for all visual tokens — colors, spacing, border radii, type scale. Override the variables at any level (root, provider, individual component) to match your product’s design system.

See Theming for the full token catalog and override patterns.