Skip to main content
This guide builds a tabbed messaging UI — Chats, Calls, and Users tabs, with a message view. Good for full-featured apps that need more than just conversations. This assumes you’ve already completed Angular Integration (project created, UI Kit installed, init + login working, CSS imported).

What You’re Building

Three sections working together:
  1. Tab bar — switches between Chats, Call Logs, and Users
  2. List view — renders the list for the active tab (conversations, call logs, or users)
  3. Message view — header + messages + composer for the selected item

Step 1 — Update the Root Component

Wire everything together. ChatStateService handles the state — cometchat-conversations and cometchat-users automatically update the service when an item is clicked, and the message components auto-subscribe.
Angular 20+ names the root component App in src/app/app.ts, as below. A project created with Angular 17–19 uses AppComponent in src/app/app.component.ts — use that file and class name instead.
src/app/app.ts
The shell needs overflow: hidden, and every flex ancestor of the message list needs min-height: 0.height: 100vh alone is not enough. The kit’s lists scroll internally, but a flex child defaults to min-height: auto and refuses to shrink below its content — so the message list pushes the shell past the viewport and the browser scrolls the page instead of the list, carrying the header and composer off-screen with it.One missing min-height: 0 anywhere between the viewport and the message list is enough to bring the page scroll back. 100dvh is preferred over 100vh because vh units include mobile browser chrome and overflow on phones.
The browser’s default 8px body margin also pushes a 100dvh shell 16px past the viewport, so the page scrolls slightly. Reset it in your global stylesheet (below the CometChat @import if you chose that option in Step 5 of Integration):
src/styles.css
How it works:
  • The activeTab property drives which list component renders — cometchat-conversations, cometchat-call-logs, or cometchat-users.
  • cometchat-conversations calls ChatStateService.setActiveConversation() on click, which extracts the User or Group and sets it as the active entity.
  • cometchat-users calls ChatStateService.setActiveUser() on click.
  • cometchat-message-header, cometchat-message-list, and cometchat-message-composer auto-subscribe to ChatStateService — no [user] or [group] bindings needed.
  • The @if block reads chatStateService.activeUser() and chatStateService.activeGroup() signals to show the chat window or the empty state.

Step 2 — Run the Project

You should see the tab bar at the top of the sidebar. Switch between Chats, Call Logs, and Users — tapping any item loads the message view on the right.

Next Steps

Theming

Customize colors, fonts, and styles to match your brand

Components Overview

Browse all prebuilt UI components

Angular Integration

Back to the main setup guide

Core Features

Chat features included out of the box