Skip to content
AnswerWell geo Documentation

Research · 5 min read · Answerwell

RealtimeKit UI Kit Custom Header, Controlbar and Meeting Layout

How to replace default meeting chrome with custom Angular layouts using RealtimeKit UI Kit web components and rtk-meeting.

This page summarises Cloudflare RealtimeKit documentation for the Humans UI Kit: prebuilt meeting chrome (rtk-header, rtk-controlbar) and how to swap them for custom Angular wrappers that still use individual rtk-* controls. The kit is a set of web components you place inside rtk-meeting; most controls expect a live meeting object from RealtimeKitClient.init.

rtk-meeting: shell for the default or custom meeting UI

Section titled “rtk-meeting: shell for the default or custom meeting UI”

A minimal integration renders the full meeting surface with one tag. Cloudflare documents:

Use the rtk-meeting component to render the meeting UI:

<body>
<rtk-meeting id="my-meeting" show-setup-screen="true" />
</body>

— Cloudflare, Build using UI Kit

In Angular you typically nest layout pieces—grid, sidebar, header, controlbar—as children of rtk-meeting and bind the client in ngOnInit:

<rtk-meeting #meetingComponent id="meeting-component">
<rtk-grid></rtk-grid>
<rtk-sidebar></rtk-sidebar>
</rtk-meeting>

The meeting instance is assigned on the element (for example meetingComponent.meeting = this.meeting and showSetupScreen = true) after loading @cloudflare/realtimekit and calling init with a participant authToken, as shown in Add Custom Controlbar and Add Custom Header.

Approach When to use it
Default rtk-header / rtk-controlbar Fastest path; pass [meeting]="meeting" and optional size, disableRender
Custom Angular header / controlbar Branding, extra buttons, or a different control layout while keeping kit behaviour
Pick individual rtk-* tags only Fine-grained layouts without using the bundled header or controlbar views

Bundled chrome can hide its own markup when you compose children yourself: both rtk-header and rtk-controlbar support [disableRender]="true" in the API examples, which pairs with replacing those tags by custom components.

Custom controlbar: replace rtk-controlbar with your own layout

Section titled “Custom controlbar: replace rtk-controlbar with your own layout”

Custom controlbars are Angular components whose templates arrange UI Kit toggles and buttons in columns or groups, then you drop that component inside rtk-meeting instead of rtk-controlbar.

How to swap the default controlbar in the meeting template

Section titled “How to swap the default controlbar in the meeting template”

Cloudflare’s replacement step is explicit:

In your main meeting component template, replace:

<rtk-controlbar style="display: flex; justify-content: space-between;"></rtk-controlbar>

with:

<app-custom-controlbar></app-custom-controlbar>

— Cloudflare, Add Custom Controlbar

A typical custom bar groups kit pieces into left, center, and right regions—for example rtk-fullscreen-toggle, rtk-settings-toggle, rtk-screen-share-toggle on the left; rtk-mic-toggle, rtk-camera-toggle, rtk-stage-toggle, rtk-leave-button in the center; and rtk-chat-toggle, rtk-participants-toggle, and similar on the right. Overflow actions often sit in rtk-more-toggle with slotted items such as rtk-pip-toggle, rtk-mute-all-button, rtk-breakout-rooms-toggle, and rtk-recording-toggle.

rtk-fullscreen-toggle targetElement and rtk-ui-provider

Section titled “rtk-fullscreen-toggle targetElement and rtk-ui-provider”

Fullscreen only works if the toggle knows which DOM node to expand. The custom controlbar guide wires rtk-fullscreen-toggle after view init and sets targetElement to the rtk-ui-provider node (see Add Custom Controlbar). The API documents the property as:

<rtk-fullscreen-toggle
size="md"
[targetElement]="htmlelement"
variant="button">
</rtk-fullscreen-toggle>

— pattern from rtk-fullscreen-toggle

rtk-ui-provider wraps meeting UI config and mode; linking fullscreen to that element keeps the expanded region aligned with the kit’s layout root.

Custom header: replace rtk-header and add app-specific actions

Section titled “Custom header: replace rtk-header and add app-specific actions”

The header pattern mirrors the controlbar: an Angular component with a flex layout and selected rtk-* indicators and metadata widgets.

How to swap the default header in the meeting template

Section titled “How to swap the default header in the meeting template”

In your main meeting component template, replace:

<rtk-header style="display: flex; justify-content: space-between;"></rtk-header>

with:

<app-custom-header></app-custom-header>

— Cloudflare, Add Custom Header

Example building blocks from the same guide include rtk-logo, rtk-recording-indicator, rtk-livestream-indicator, center rtk-meeting-title, and right-side rtk-grid-pagination, rtk-participant-count, rtk-viewer-count, and rtk-clock. Ordinary Angular buttons (for example “Report Bug”) sit beside kit components and use your own (click) handlers.

Cloudflare notes that RealtimeKit UI provides a default header view (RtkMeetingHeaderView in their wording on Add Custom Header); when you need extra controls, you replace that bundled view with individual UI Kit components while keeping Angular’s component and event model.

Composing meeting UI from atomic rtk-* components

Section titled “Composing meeting UI from atomic rtk-* components”

Beyond header and controlbar, the UI Kit exposes many single-purpose web components. They are not a second framework: you place them in templates and pass inputs consistent with each Angular API reference page.

meeting binding pattern on controls and panels

Section titled “meeting binding pattern on controls and panels”

Most interactive pieces take the same core input:

<rtk-mic-toggle
[meeting]="meeting"
size="md"
variant="button">
</rtk-mic-toggle>

The same [meeting]="meeting" pattern appears across toggles, sidebars, chat, settings, and debug tools—for example rtk-chat, rtk-sidebar, rtk-settings, and rtk-debugger-toggle. Until meeting is initialised and assigned, controls cannot drive session state.

Functional areas you can mix into a custom layout

Section titled “Functional areas you can mix into a custom layout”

Use the following map to choose components; each name links to its property list in Cloudflare’s reference.

Area Representative components
Video grid and tiles rtk-simple-grid, rtk-participant-tile, rtk-screenshare-view
Audio-only views rtk-audio-grid, rtk-audio-tile, rtk-audio-visualizer
Chat and polls rtk-chat-messages-ui-paginated, rtk-chat-selector, rtk-polls-toggle
Breakout rooms rtk-breakout-rooms-manager, rtk-breakout-room-manager, rtk-breakout-room-participants
AI-related UI rtk-ai, rtk-ai-toggle, rtk-ai-transcriptions, rtk-transcripts
Lifecycle screens rtk-setup-screen, rtk-waiting-screen, rtk-ended-screen, rtk-idle-screen
Device and quality rtk-camera-selector, rtk-microphone-selector, rtk-speaker-selector, rtk-network-indicator

rtk-meeting itself accepts layout-oriented inputs such as [applyDesignSystem], [config], and [gridLayout] when you stay on the default shell but tune presentation.

Angular module setup: CUSTOM_ELEMENTS_SCHEMA and declarations

Section titled “Angular module setup: CUSTOM_ELEMENTS_SCHEMA and declarations”

Custom header and controlbar components must be declared in your NgModule, and Angular must allow unknown rtk-* tags:

Don’t forget to declare your custom controlbar component in your Angular module:

schemas: [CUSTOM_ELEMENTS_SCHEMA], // Required for RTK web components

— Cloudflare, Add Custom Controlbar

The same requirement appears in Add Custom Header. Declare MeetingComponent, CustomControlbarComponent, and CustomHeaderComponent in declarations alongside BrowserModule.

Common mistakes when customising meeting chrome

Section titled “Common mistakes when customising meeting chrome”
  • Omitting CUSTOM_ELEMENTS_SCHEMA — Angular strips or errors on rtk-* elements in templates.
  • Forgetting targetElement on fullscreen — Fullscreen appears broken until rtk-fullscreen-toggle points at rtk-ui-provider (or another intended root).
  • Controls before init — Toggles reference meeting while it is still undefined; initialise the client first, then assign meeting on rtk-meeting.
  • Only restyling defaults — If you only need spacing, try size="md" and CSS on rtk-controlbar / rtk-header before rebuilding the whole bar.
  1. Open your app’s meeting route with DevTools and confirm a single rtk-meeting hosts your custom app-custom-header and/or app-custom-controlbar, with no extra default rtk-header / rtk-controlbar unless intended.
  2. Verify RealtimeKitClient.init completes and the meeting reference is set on the meeting element before toggles are used, following Build using UI Kit and the Add Custom Controlbar flow.
  3. Test mic, camera, leave, and one sidebar action (chat or participants) to confirm [meeting]="meeting" wiring on each embedded component matches its API reference page.
  4. Trigger fullscreen and confirm the viewport matches the element targeted for rtk-fullscreen-toggle.
  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact wording you are asking about.