Skip to main content
This guide covers the full group lifecycle: creating groups, joining them, managing members, changing roles, and transferring ownership. Before starting, complete the Integration Guide.

Components

The components below (cometchat-create-group, cometchat-add-members, cometchat-banned-members, cometchat-transfer-ownership) are provided in the sample app, not in the @cometchat/chat-uikit-angular package. Use them as reference implementations or build your own using the CometChat SDK methods shown in this guide.

Implementation Steps

1. Create Group

Build a component that collects a group name, type, and optional password. On submit, generate a unique GUID, call CometChat.createGroup(), and emit the event so the rest of the UI updates.

2. Join Group

Handle joining for both public and password-protected groups. On success, emit ccGroupMemberJoined to update the member list across the app.

3. View Group Members

Render the member list for a group using cometchat-group-members. Pass (itemClick) to handle member selection.

4. Add Members

cometchat-add-members is a sample-app component. Use CometChat.addMembersToGroup() to build your own add-members UI.
Let admins select users and add them to the group.

5. Ban Members

cometchat-banned-members is a sample-app component. Use CometChat.banGroupMember() and CometChat.unbanGroupMember() to build your own banned-members UI.
Display banned members and provide unban functionality for group admins.

6. Change Member Scope

Promote or demote a member by calling CometChat.updateGroupMemberScope(). Emit ccGroupMemberScopeChanged so the UI reflects the role change.

7. Transfer Ownership

cometchat-transfer-ownership is a sample-app component. Use CometChat.transferGroupOwnership() to build your own transfer-ownership UI.
Let the current owner select a member and transfer ownership.

Feature Matrix


Next Steps

Groups

Display and manage group lists.

Group Members

Display and manage group member lists.

All Guides

Browse all feature and formatter guides.

Sample App

Full working sample application on GitHub.