UI Kit React Components: CDN Import, Stage Layout and Control Bar
How Cloudflare RealtimeKit UI Kit loads over CDN and how React Rtk components compose meeting audio, video, chat, and controls.
This page summarises Cloudflare RealtimeKit documentation on the UI Kit: pre-built interface pieces for human-facing real-time sessions. You typically reach for it when you already use RealtimeKit for rooms and media, but you do not want to rebuild grids, control bars, chat panes, and lifecycle screens from scratch. The cluster material is almost entirely the React API reference plus one HTML CDN bootstrap page; native Web Components load from CDN, while React apps import named components from @cloudflare/realtimekit-react-ui.
UI Kit: what it is and when to use it
Section titled “UI Kit: what it is and when to use it”The UI Kit is a library of ready-made Rtk components (prefix Rtk) that mirror common video-meeting UX: participant grids, spotlight layouts, mute-all flows, in-call chat, polls, recording toggles, setup/waiting/ended screens, and developer debug panels. Each documented React entry follows the same contract: import the symbol from @cloudflare/realtimekit-react-ui and render it inside your tree. Property-heavy controls (buttons, grids, menus) document an additional “With Properties” example showing optional attributes such as disabled, size, or icon.
Use the CDN bootstrap when you are not bundling React and want custom elements registered globally. Use the React package when your app is already React-based and you compose screens declaratively. Deeper behaviour of each component (events, required providers, styling) lives on its own API page—the cluster only guarantees the import pattern and a subset of example props.
CDN import: load UI Kit and Core in HTML
Section titled “CDN import: load UI Kit and Core in HTML”For static HTML or non-React hosts, Cloudflare documents loading the UI Kit loader and the RealtimeKit browser bundle from jsDelivr inside index.html.
Add the following imports to your HTML file:
— Cloudflare, Build using UI Kit
The same page instructs you to register custom elements and pull in Core:
Import helper to load UI Kit components
— Cloudflare, Build using UI Kit
Import RealtimeKit Core via CDN
— Cloudflare, Build using UI Kit
In practice you add a type="module" script that calls defineCustomElements() from @cloudflare/realtimekit-ui’s loader, and a separate script tag for @cloudflare/realtimekit browser.js, as shown in Build using UI Kit. Without that sequence, documented Rtk* custom elements will not upgrade in the DOM.
- Open your host
index.html(or equivalent shell). - Add the module loader import from
@cloudflare/realtimekit-uiand invokedefineCustomElements()as in Build using UI Kit. - Add the RealtimeKit Core
browser.jsscript from the same documentation block. - Place UI Kit tags or your own markup that references them only after both scripts can run.
React basic usage: import pattern for every Rtk component
Section titled “React basic usage: import pattern for every Rtk component”Across the React API reference, Basic Usage is identical in shape: one import line and a zero-config render. For example, RtkControlbar shows:
import { RtkControlbar } from '@cloudflare/realtimekit-react-ui';
function MyComponent() { return <RtkControlbar />;}The same pattern appears for layout primitives (RtkGrid, RtkStage), communication (RtkChat), and shell wiring (RtkUiProvider). Treat @cloudflare/realtimekit-react-ui as the single package surface for React; open the component’s page when you need props, events, or slots.
RtkUiProvider: root wrapper for React UI Kit
Section titled “RtkUiProvider: root wrapper for React UI Kit”RtkUiProvider uses the same basic usage block as other components. In meeting apps, place it at or near the root of the RealtimeKit UI subtree so child Rtk* components share whatever context the provider supplies (see that page for full requirements beyond the cluster excerpt).
With Properties: optional props on controls and layout
Section titled “With Properties: optional props on controls and layout”Several entries add a second example with attributes. These are the ones explicitly illustrated in the cluster:
| Component | Example props (from docs) | API page |
|---|---|---|
RtkButton |
disabled, kind, reverse |
RtkButton |
RtkControlbarButton |
brandIcon, disabled, icon |
RtkControlbarButton |
RtkCounter |
minValue, size, value |
RtkCounter |
RtkGrid / RtkSpotlightGrid |
aspectRatio, gap, gridSize |
RtkGrid, RtkSpotlightGrid |
RtkStage |
iconPack, t (i18n) |
RtkStage |
RtkTranscript |
t, transcript |
RtkTranscript |
RtkSettingsToggle |
size, variant |
RtkSettingsToggle |
If a component’s cluster excerpt only lists Basic Usage, assume defaults apply until you read its API page—do not invent prop names.
Component map: which Rtk piece fits which meeting feature
Section titled “Component map: which Rtk piece fits which meeting feature”Rather than duplicating eighty-plus identical import blocks, group components by the job a developer is trying to finish. Each name links to Cloudflare’s React reference entry.
Audio, video layout and stage
Section titled “Audio, video layout and stage”| Goal | Components |
|---|---|
| Show participants in a grid | RtkGrid, RtkSimpleGrid, RtkMixedGrid, RtkGridPagination |
| Spotlight / presenter focus | RtkSpotlightGrid, RtkSpotlightIndicator, RtkStage, RtkStageToggle |
| Audio-only UI | RtkAudioGrid, RtkAudioTile, RtkAudioVisualizer |
| Identity on tile | RtkAvatar, RtkNameTag |
| Host moderation | RtkMuteAllButton, RtkMuteAllConfirmation |
Control bar, header and session chrome
Section titled “Control bar, header and session chrome”| Goal | Components |
|---|---|
| Bottom meeting toolbar | RtkControlbar, RtkControlbarButton |
| Top bar / branding | RtkHeader, RtkLogo, RtkClock |
| Tabs and overflow | RtkTabBar, RtkMoreToggle |
| Sidebar panels | RtkSidebar, RtkSidebarUi |
Chat, files and notifications
Section titled “Chat, files and notifications”| Goal | Components |
|---|---|
| In-call text chat | RtkChat, RtkChatToggle, RtkMessageView |
| Rich text / broadcast | RtkMarkdownView, RtkBroadcastMessageModal |
| Files and emoji | RtkFileDropzone, RtkFilePickerButton, RtkEmojiPicker, RtkEmojiPickerButton |
| Toasts and network state | RtkNotification, RtkNotifications, RtkNetworkIndicator |
AI, captions and transcripts
Section titled “AI, captions and transcripts”| Goal | Components |
|---|---|
| AI features in UI | RtkAi, RtkAiToggle |
| Caption / transcription surfaces | RtkCaptionToggle, RtkAiTranscriptions, RtkTranscript, RtkTranscripts |
Livestream, recording and viewer mode
Section titled “Livestream, recording and viewer mode”| Goal | Components |
|---|---|
| Live streaming controls | RtkLivestreamPlayer, RtkLivestreamToggle, RtkLivestreamIndicator |
| Recording | RtkRecordingToggle, RtkRecordingIndicator |
| Audience size | RtkViewerCount |
| View toggles | RtkFullscreenToggle, RtkPipToggle |
Polls, plugins and settings
Section titled “Polls, plugins and settings”| Goal | Components |
|---|---|
| Polls | RtkPoll, RtkPollsToggle |
| Plugins | RtkPlugins, RtkPluginsToggle, RtkPluginMain |
| Device / app settings | RtkSettings, RtkSettingsToggle, RtkSettingsVideo, RtkPermissionsMessage |
Lifecycle screens and debugging
Section titled “Lifecycle screens and debugging”| Goal | Components |
|---|---|
| Pre-join and terminal states | RtkSetupScreen, RtkWaitingScreen, RtkIdleScreen, RtkEndedScreen |
| In-call diagnostics | RtkDebugger, RtkDebuggerToggle, RtkDebuggerAudio, RtkDebuggerVideo, RtkDebuggerScreenshare, RtkDebuggerSystem |
Shared primitives (dialogs, menus, buttons)
Section titled “Shared primitives (dialogs, menus, buttons)”Reusable building blocks include RtkButton, RtkIcon, RtkSpinner, RtkSwitch, RtkDialog, RtkDialogManager, RtkConfirmationModal, RtkOverlayModal, RtkMenu, RtkMenuList, RtkMenuItem, RtkTooltip, and RtkInformationTooltip.
Video effects on Android (separate from React UI Kit)
Section titled “Video effects on Android (separate from React UI Kit)”One cluster document covers video filters for mobile native builds, not the React Rtk* package. Installation is via Gradle:
You can add the pre-packaged filters to your project by adding the following dependency to your build.gradle file:
— Cloudflare, Video Effects
The documented dependency is implementation 'com.cloudflare.realtimekit:filters:0.1.0'. Treat that path as Core/mobile enhancement; it does not replace CDN or React UI Kit setup for web meeting chrome.
Common mistakes when wiring the UI Kit
Section titled “Common mistakes when wiring the UI Kit”- Skipping
defineCustomElements()on static HTML while still expectingRtk*custom elements to render—follow Build using UI Kit in order. - Importing from the wrong package in React—cluster examples exclusively use
@cloudflare/realtimekit-react-ui, not the CDN loader module. - Dropping bare components without layout shell—grids and control bars usually need surrounding structure (
RtkStage,RtkHeader,RtkUiProvider); compose to match your product layout. - Guessing props—only pass attributes illustrated on the component page (for example
RtkGridgridSizeandgapin RtkGrid). - Confusing UI Kit with Android filters—Video Effects is a native dependency; web React components are unrelated.
How to check this on your site
Section titled “How to check this on your site”- Open your host page and confirm both scripts from Build using UI Kit load without network errors (loader module and
browser.js). - In a React build, verify
@cloudflare/realtimekit-react-uiresolves and a minimal component such as RtkButton renders without import errors. - Join a test session and confirm the pieces you composed (for example RtkGrid plus RtkControlbar) appear and respond to meeting state.
- Enable RtkDebugger or RtkDebuggerToggle during development to inspect media and system panels documented under the debugger family.
- You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page does not match the official RealtimeKit UI Kit docs, email yimasynthetic@gmail.com with the page URL and the exact sentence you believe is wrong, and we will clarify or correct it.