Skip to main content
UI Kit Builder for React Native streamlines how you configure CometChat’s React Native UI Kit. Build themes, toggles, and layouts visually, export the settings JSON, and keep your production app synced by reading the same configuration at runtime.

Complete Integration Workflow

  1. Clone the React Native Builder sample.
  2. Install dependencies (Node modules + CocoaPods) and add your CometChat credentials.
  3. Run the sample on iOS/Android, scan/import a QR configuration, and validate the experience.
  4. Copy the generated config store files into your own React Native app.
  5. Wrap UI Kit components with the Builder-provided theme/settings.
  6. Extend with fonts, persistence, and feature toggles as needed.

Run the CometChat UIKit Builder Sample App

1. Download & Install

2. iOS Dependencies

3. Configure CometChat credentials

Edit src/utils/AppConstants.tsx:

4. Run the Builder sample

With the sample running you can scan QR codes, import JSON, and preview Builder-generated layouts before you copy them into another project.

Integrate Builder Configuration into Your React Native App

1. Install shared dependencies

2. Copy configuration files

From the sample project, copy:
  • src/config/store.ts (Zustand store that manages Builder settings)
  • src/config/config.json (default configuration template)
Place them inside yourProject/src/config/.

3. Wire the Builder theme into UI Kit

Use the Zustand store everywhere you need runtime access to Builder settings (feature toggles, layout preferences, or styling).

4. Respect feature toggles in UI Kit components

  • Chat features (typing indicator, threads, mentions, reactions, etc.).
  • Call features (1:1 voice, group video, lobby).
  • Layout and discovery (tabs, sidebar, chat type).
These booleans live under settings.chatFeatures, settings.callFeatures, and settings.layout inside the Builder JSON, so you can decide which CometChat components to render or hide per experience.

Project Structure Snapshot

Use the sample layout as a reference when organizing your own screens or when importing the Builder module as a feature flag playground.

Configuration Schema

Each QR code or exported JSON follows this structure:
Persist this JSON locally (AsyncStorage, secure storage, or your backend) and hydrate the Zustand store at startup.

Advanced Configuration

Custom fonts

  1. Add fonts to ios/<App>/Resources/Fonts/ and android/app/src/main/assets/fonts/.
  2. Map the font family in App.tsx:

Persisting Builder settings manually


Troubleshooting & Tips

  • Metro or Gradle errors: ensure Node 18+, React Native 0.77+, and the correct Android/iOS toolchains are installed.
  • Plugin/config not loading: verify AppConstants.tsx values and network connectivity when launching the Builder.
  • QR code parsing issues: validate that the JSON matches the schema above; malformed objects will be ignored.
  • UI Kit mismatches: confirm both the Builder sample and your production app use the same version of @cometchat/chat-uikit-react-native.

Next Steps