Skip to main content
The UI Kit supports two approaches to styling: XML theme attributes for declarative, app-wide theming, and programmatic setters for runtime customization.
Programmatic setters take precedence over XML theme attributes when both are applied to the same property.

XML Theme Hierarchy

The theming system follows a three-level hierarchy:
  1. Your AppTheme extends CometChatTheme.DayNight (theme-level colors and fonts)
  2. Component styles extend parent styles (e.g., cometchatConversationsStyle)
  3. Sub-component styles are nested within component styles (e.g., avatar style within conversations)

Font Customization

Override fonts at the theme level using these attributes:

Programmatic Styling with CometChatTheme

The CometChatTheme class provides static setter/getter methods for runtime color and typography token overrides:

Color Tokens

Icon Tints

Button Colors

Component Style Setters

Each component exposes setter methods for its own style and sub-component styles. Using CometChatConversations as an example: