Skip to content
AnswerWell geo Documentation

Research · 7 min read · Answerwell

Meeting UI Kit Design Tokens, App Theme and Cross-Platform Theming

How Cloudflare RealtimeKit UI Kit design tokens, AppTheme, and DesignLibrary customize colors, spacing, typography, and borders on mobile.

This page summarizes Cloudflare RealtimeKit documentation on the Humans UI Kit: design tokens, global theme setup, and how individual meeting components pick up your branding on Android, iOS, and React Native. If you are skinning a video meeting, livestream, or webinar UI, the same token model applies across platforms, but the APIs you call differ.

Design tokens: shared visual system for the UI Kit

Section titled “Design tokens: shared visual system for the UI Kit”

Design tokens are the values that keep the UI Kit consistent—typography, spacing, colors, borders, and related appearance. Cloudflare describes them as values that maintain a design system and that are shared among components, including via CSS variables on stacks that support them.

Design tokens are the design related values which are used to maintain a design system, which provides flexibility in customizing the overall design of a system with values such as: typography, spacing, colors etc.

— Cloudflare, Design System

Each mobile platform exposes a token system for colors, borders, typography, and spacing. You configure tokens before launching a meeting; the UI Kit then applies them across components. The Override Design System section notes that provideRtkDesignSystem() lets you replace the built-in design system with your own.

Default color tokens (all mobile platforms)

Section titled “Default color tokens (all mobile platforms)”
Token Android iOS React Native
Brand color #2160FD #0246FD #2160FD
Background #080808 #050505 #080808
Text on background #FFFFFF #FFFFFF #FFFFFF
Text on brand #111111 #111111 #FFFFFF
Danger #FF2D2D #FF2D2D #FF2D2D
Success #83D017 #83D017 #83D017
Warning #FFCD07 #FFCD07 #FFCD07

On web-oriented configuration, color CSS variables use space-separated RGB components, for example --rtk-colors-brand-500: 33 96 253 (see Design System — Colours).

Border tokens use named presets, not raw pixel lists in the high-level API:

Token Values
borderWidth none, thin, fat
borderRadius sharp, rounded, extra-rounded, circular

All mobile platforms support the same border radius and border width options according to Design System — Borders.

Global theme setup: provideRtkDesignSystem vs native token objects

Section titled “Global theme setup: provideRtkDesignSystem vs native token objects”

For stacks that use the provideRtkDesignSystem() utility, you pass a plain object of token overrides before the meeting UI starts. Examples from the branding guide include spacing, borders, and fonts:

provideRtkDesignSystem({
spacingBase: 4,
borderRadius: "extra-rounded",
borderWidth: "fat",
fontFamily: "Helvetica",
});

The spacingBase property sets the base unit for the spacing scale in pixels; all spacing values in the UI Kit derive from that base (default 4). For typography you can use either fontFamily (you must load the font yourself) or googleFont (loaded automatically). Font customization is not available through the RtkDesignTokens API on platforms where the UI Kit defaults to the system font—see platform notes below.

On Android, RtkDesignTokens is the top-level container for customizing look and feel. It holds optional colors (RtkColorTokens), borderWidth (RtkBorderWidthToken), and borderRadius (RtkBorderRadiusToken). You construct shades explicitly (brand and background palettes) and pass enums such as RtkBorderRadiusToken.Rounded and RtkBorderWidthToken.Thin, as shown in Basic Usage.

You then pass that object into per-component APIs such as applyDesignTokens(designTokens: RtkDesignTokens) on views like RtkButton, RtkGridView, and RtkMeetingHeaderView.

iOS centralizes tokens in DesignLibrary:

The central design token library providing color, spacing, border width, and border radius tokens. Access through the DesignLibrary.shared singleton.

You read tokens in Swift, for example designLibrary.color.background, designLibrary.space.space4, designLibrary.borderSize.thin, and designLibrary.borderRadius.rounded (Access design tokens).

For component-level appearance beyond shared tokens, AppTheme is the application theme singleton:

The application theme singleton that provides pre-configured appearance objects for UI components. Use AppTheme.shared to access default appearances or call setUp(theme:) to apply a custom theme.

setUp(theme: AppThemeProtocol) applies a custom theme conforming to AppThemeProtocol. That path is how you override per-component text appearance when token APIs do not expose fonts (see typography below).

Advanced iOS border and spacing multipliers use a DesignLibraryConfiguratorProtocol implementation and DesignLibrary.shared.setConfigurator(configurator:)—factors such as cornerRadiusRoundFactor and borderSizeThinFactor control multipliers for each border style (Design System — Usage (Borders)).

Platform differences: fonts, spacing, and borderRadius naming

Section titled “Platform differences: fonts, spacing, and borderRadius naming”

Getting theming wrong usually means using the API from the wrong platform or missing a prerequisite (font loading, configurator registration, or hyphen vs enum spelling).

Platform How to customize fonts Constraints
React Native / provideRtkDesignSystem fontFamily or googleFont in the design token object Load custom fonts before calling provideRtkDesignSystem when using fontFamily.
iOS UI Kit Custom AppThemeProtocol with per-component RtkTextAppearance (e.g. clockViewAppearance) Default is UIFont.systemFont; not exposed on DesignLibraryConfiguratorProtocol.
Android RtkDesignTokens Not via font fields in the token API UI Kit uses system font by default.

The branding guide states explicitly that font customization is not available through the RtkDesignTokens API on Android, and that iOS font changes require a custom AppThemeProtocol implementation (Design System — Typography / Usage).

React Native and provideRtkDesignSystem accept spacingBase (default 4 px). On iOS, spacing uses SpaceToken with base unit 4 points, scale space0 (0) through space9 (36); spacing is not exposed on the public DesignLibraryConfiguratorProtocol—values are derived internally from the base unit (Design System — Usage (Spacing)).

iOS maps to BorderRadiusToken.RadiusType (.sharp, .rounded, .extrarounded, .circular) and BorderWidthToken.Width (.none, .thin, .fat) per Design System — Borders.

Component theming and meeting state: applyDesignTokens and activate

Section titled “Component theming and meeting state: applyDesignTokens and activate”

Most UI Kit controls are useless until they are bound to a RealtimeKitClient or participant. The documentation repeats two patterns:

  1. activate(...) — bind the control to meeting or participant state (for example RtkMicToggleButton.activate(meeting:), RtkParticipantTileView.activate(participant:), RtkJoinButton.activate with optional display-name validation).
  2. applyDesignTokens / iOS appearance APIs — apply your RtkDesignTokens or tint properties without rebinding meeting logic (RtkControlBarButton on Android; selectedStateTintColor on iOS).

Pair deactivate() on toggles and webinar controls when you tear down UI to remove listeners (RtkCameraToggleButton, RtkWebinarControlBarView).

Layout-specific views add refresh hooks—for example RtkGridView.refresh(force:) and enableFocusMode() to hide the peer strip during focus mode, or iOS GridView.settingFrames(visibleItemCount:...) for portrait/landscape layouts.

Video surfaces need explicit cleanup when reused: iOS RtkVideoView provides prepareForReuse(), clean(), and reattachRenderer(). For the local participant preview, Local Participant notes that the UIView manages its own lifecycle and cleans native resources when leaving the window—no manual cleanup is required.

Bottom sheets and dialogs (show(fragmentManager:tag:), show(on:) on iOS) are presentation helpers; they still rely on the same token and activate patterns when embedded in a custom shell—see for example RtkChatBottomSheet and RtkLeaveDialog.

Full meeting UI: MeetingViewController and meeting type presets

Section titled “Full meeting UI: MeetingViewController and meeting type presets”

For an all-in-one iOS meeting experience, MeetingViewController requires a RealtimeKitClient and a completion closure called when the meeting ends—both required initializer parameters.

Meeting feature visibility at the core SDK layer is represented by RTKThemePreset (setupScreen, waitingRoom, controlBar, header, pipMode, plugins, and related fields). Most of those meeting.self.config.* properties are marked Deprecated in the API reference. The non-deprecated viewType property indicates meeting mode; documented values include GROUP_CALL, LIVESTREAM, CHAT, and AUDIO_ROOM.

To cap how many participants appear in the active map (affects UI density), use meeting.participants.setMaxActiveParticipantsCount(limit) on RTKParticipants.

Recording indicators in the UI Kit (RtkRecordingIndicator, RtkRecordingView) reflect meeting recording state; starting and stopping recordings themselves belong to the Recording SDK flow (init(client:), startRecording(), stopRecording(), cleanup() after leave), where autoStart and autoStop default to true so manual calls are often unnecessary.

Common mistakes when customizing the UI Kit

Section titled “Common mistakes when customizing the UI Kit”
  • Theming after launch — Tokens should be applied before the meeting UI starts; late applyDesignTokens on one widget leaves the rest on defaults.
  • Using Android token APIs for fonts on iOS — Use AppThemeProtocol / setUp(theme:) instead of expecting RtkDesignTokens font fields.
  • Wrong borderRadius literal on iOS — Use .extrarounded, not extra-rounded, in Swift enums.
  • Forgetting activate — Controls stay inert without binding to RealtimeKitClient or RtkMeetingParticipant.
  • Skipping deactivate and video clean() — Leaks listeners or renderers when reusing cells or swapping meetings.
  • Ignoring join validation — RtkJoinButton.activate can block join and show a toast when display name is editable but empty.
  1. Confirm your global theme: on React Native, verify provideRtkDesignSystem() runs before join; on Android, confirm your RtkDesignTokens instance matches brand colors in Design System; on iOS, log DesignLibrary.shared color and space values per DesignLibrary.

  2. Join a test meeting and check one control bar control, one header, and one participant tile still call activate and show updated tokens (RtkMeetingControlBarView, RtkMeetingHeaderView, RtkParticipantTileView).

  3. Rotate the device or trigger a grid refresh and confirm layout APIs still behave (settingFrames / refresh(force:) on GridView / RtkGridView).

  4. Leave the meeting and confirm recording or voice paths call cleanup() where documented (Recording SDK guide).

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page does not match the current Cloudflare docs or your integration behaves differently, email yimasynthetic@gmail.com with the page URL and the exact wording you think is wrong. We will clarify or correct it.