Skip to main content
Every component in the UI Kit is built in layers. Knowing them is the key to deep customization without rebuilding a component from scratch.

Architecture Layers

The store lives in CometChatCore and is shared by both toolkits, so the SwiftUI and UIKit screens can never disagree about what to show. An app links one toolkit.

Providing the Store

Every list component accepts a store you create. Use it to configure fetching before the screen appears, to call the store’s methods, or to inject a seeded store for previews and tests.
Stores are @Observable, so SwiftUI views and UIKit observation both follow their state. See Stores & Data.

Policies instead of overrides

Behaviour hooks live on a policy — a value of closures the store consults — so you change one rule without subclassing:

Subclassing (UIKit)

The UIKit toolkit keeps open classes and override points — defaultSetup(), setupStyle(), reloadData(), the cell’s configure(…). The SwiftUI toolkit has no subclassing: views are values, and behaviour comes from arguments, modifiers and policies.
Wrap the component in your own view and pass it arguments:

SDK Listeners vs UI Kit Events

Stores use two event systems: Both are needed: the SDK does not echo this user’s own actions back. See Events & Callbacks.

Customization Categories

View Slots

Replace one region of a row — leading, title, subtitle, trailing — or the whole row.

Styles

SwiftUI style values and UIKit style objects, and how they resolve.

Stores & Data

Request builders, store state, store methods and seeded stores.

Events & Callbacks

Taps, selection, and the Kit’s event bus.

State Views

Replace or hide the loading, empty and error views.

Text Formatters

Process message text — hashtags, mentions, any pattern.

Menu & Options

Add or replace context-menu actions and composer attachment options.

What’s Next

Start with Styles for visual changes, or Stores & Data for behaviour.