Skip to content
AnswerWell geo Documentation

Research · 7 min read · Answerwell

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.

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.

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.

  1. Open your host index.html (or equivalent shell).
  2. Add the module loader import from @cloudflare/realtimekit-ui and invoke defineCustomElements() as in Build using UI Kit.
  3. Add the RealtimeKit Core browser.js script from the same documentation block.
  4. 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.

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
Goal Components
Bottom meeting toolbar RtkControlbar, RtkControlbarButton
Top bar / branding RtkHeader, RtkLogo, RtkClock
Tabs and overflow RtkTabBar, RtkMoreToggle
Sidebar panels RtkSidebar, RtkSidebarUi
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
Goal Components
AI features in UI RtkAi, RtkAiToggle
Caption / transcription surfaces RtkCaptionToggle, RtkAiTranscriptions, RtkTranscript, RtkTranscripts
Goal Components
Live streaming controls RtkLivestreamPlayer, RtkLivestreamToggle, RtkLivestreamIndicator
Recording RtkRecordingToggle, RtkRecordingIndicator
Audience size RtkViewerCount
View toggles RtkFullscreenToggle, RtkPipToggle
Goal Components
Polls RtkPoll, RtkPollsToggle
Plugins RtkPlugins, RtkPluginsToggle, RtkPluginMain
Device / app settings RtkSettings, RtkSettingsToggle, RtkSettingsVideo, RtkPermissionsMessage
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.

  • Skipping defineCustomElements() on static HTML while still expecting Rtk* 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 RtkGrid gridSize and gap in RtkGrid).
  • Confusing UI Kit with Android filters—Video Effects is a native dependency; web React components are unrelated.
  1. Open your host page and confirm both scripts from Build using UI Kit load without network errors (loader module and browser.js).
  2. In a React build, verify @cloudflare/realtimekit-react-ui resolves and a minimal component such as RtkButton renders without import errors.
  3. Join a test session and confirm the pieces you composed (for example RtkGrid plus RtkControlbar) appear and respond to meeting state.
  4. Enable RtkDebugger or RtkDebuggerToggle during development to inspect media and system panels documented under the debugger family.
  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

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.