Skip to main content
The @calcom/embed-react package provides a React component and hooks for seamlessly integrating Cal.com into your React applications with full TypeScript support.

Installation

Peer Dependencies

The package requires React 18+ or React 19+:

Quick Start

Inline Embed Component

The simplest way to embed Cal.com is using the Cal component:

With Configuration

Prefill booking information and customize the appearance:

Component Props

The Cal component accepts the following props:

CalProps Interface

Configuration Options (config prop)

Using getCalApi

For more advanced use cases, use the getCalApi function to interact with the Cal API programmatically:

Basic Usage

With Namespace

Event Handling

Listen to booking events using the event system:

Type-Safe Event Handling

Available Events

Customizing UI

Customize the embed appearance dynamically:
Create a modal embed triggered by a button:

Floating Button

Add a persistent floating button:

Multiple Embeds with Namespaces

Use namespaces to have multiple embeds on the same page:

TypeScript Support

The package includes full TypeScript definitions:

Custom Embed URL

For self-hosted instances, specify a custom embed URL:

Best Practices

When you have multiple embeds on the same page, always use unique namespaces to prevent conflicts.
Always remove event listeners in the cleanup function to prevent memory leaks.
The getCalApi function is asynchronous. Handle loading states appropriately in your UI.
Ensure the container has appropriate dimensions. The embed will fill its container.

Next Steps

Customization

Learn about theme and styling options

JavaScript Snippet

Alternative implementation for non-React apps