Build your own plugins
This guide explains how to build a custom plugin and run it inside a meeting using the Cloudflare RealtimeKit Core SDK.
A custom plugin is a DOM element that you register with the SDK. When a participant activates the plugin, RealtimeKit makes it active for everyone in the session and renders it in the meeting layout.
This page builds on the Initialize SDK and Plugins guides. Read those first.
The examples assume you have already imported the necessary packages and initialized the SDK.
A plugin has two parts:
- A component: a DOM element (
HTMLElement) that holds your plugin's UI and logic. - A registration: a configuration object you pass to the SDK so it can list, activate, and render the component.
RealtimeKit synchronizes activation state across the session. To share plugin data between participants, use collaborative stores.
A plugin component must be an HTMLElement. Build it directly as a custom element, or create a container element and mount your framework component tree into it.
Register the plugins available in a session when you initialize the SDK. Pass an array of plugin configurations as defaults.plugins, using the pluginElement you created in step 1 as the component.
For a description of every configuration field, refer to Register a plugin.
After registration, the plugin appears in meeting.plugins.all. Activate it to make it active for everyone in the session.
A Plugin object emits events as its state changes. Use them to set up or tear down your component when it is activated or deactivated.
For the full list of plugin events, refer to Listen to plugin events.
Each participant runs their own copy of the plugin component, so you need a way to share state between them. RealtimeKit offers two built-in options for real-time communication:
- Collaborative stores — a shared key-value store that syncs state across the session.
- Message broadcasts — send custom events to every participant in a meeting.
For plugins with simple requirements, these built-in APIs are enough to handle your collaborative logic.
For richer, full-featured collaboration, you can pair your plugin with a dedicated third-party framework:
| Framework | Description | Notes |
|---|---|---|
| Collab-Kit ↗ | Full-featured SDK for building collaborative apps. | Beta |
| Party-Kit ↗ | Low-level framework for building collaborative applications. | Open source |
- Review the Plugins API for the complete
PluginandPluginsreference. - Use collaborative stores to build richer shared experiences.
- Get started with the RealtimeKit plugins example ↗ for a working React implementation.