Prerequisites
- Node.js 20.19+, 22.12+ or 24+ (what Angular 21 requires)
- Angular 17, 18, 19, 20 or 21 — the UI Kit declares
@angular/core>=17.0.0 <22.0.0 - A CometChat account with App ID and Auth Key
Angular 22 is not supported yet: installing the UI Kit into an Angular 22 app fails with
ERESOLVE. The latest Angular CLI scaffolds Angular 22, so create new apps with a pinned CLI: npx @angular/cli@21 new my-app --style css --ssr false.Step 1: Install the Package
@cometchat/chat-sdk-javascript, @cometchat/cards-angular and dompurify are required peer dependencies — install them explicitly as shown.
Step 2: Import Styles
Add the CSS variables to yourangular.json:
styles.css:
Step 3: Register UIKit Assets
The UIKit ships icons, images, and audio files that Angular’s build system won’t serve automatically. Append the UIKit entry to the existingassets array in your angular.json (under architect.build.options) so they are copied to the output:
public on Angular 18+; src/favicon.ico and src/assets on Angular 17) — replacing the array instead of appending to it stops your own static files from being served.
ng build fails with bundle initial exceeded maximum budget under the CLI’s default 1 MB production budget. Raise the initial budget in angular.json — see Raise the Production Bundle Budget.Step 4: Initialize CometChat
Initialize CometChat inmain.ts before bootstrapping the Angular app, using UIKitSettingsBuilder:
To enable voice and video calling, install
@cometchat/calls-sdk-javascript and add .setCallingEnabled(true) to the builder. Without this, call buttons are hidden across all components. See Call Features for details.Step 5: Login a User
Step 6: Add a Component
Add the conversations component to your template:Make sure to replace
YOUR_APP_ID, YOUR_AUTH_KEY, and YOUR_REGION with your actual CometChat credentials.Next Steps
Integration Guide
Full setup guide with examples
Components
Explore all available components