CometChatGroupMembers lists the members of one group. Each row shows the member’s avatar
with a presence dot, their name — “You” on your own row — and a chip for the owner, admins
and moderators. Rows offer Scope, Ban and Kick to the people allowed to use
them. The list paginates as you scroll, updates in real time and searches the server as you
type in its search field.

Where It Fits
CometChatGroupMembers is the screen a group’s details open to show who is in it, and the
picker a “mention” or “transfer ownership” flow embeds.
Quick Start
- SwiftUI
- UIKit
onItemClick hands you a CometChatSDK.GroupMember.The list draws a system navigation bar, so it brings its own NavigationStack. If your
screen already has one, pass embedsNavigationStack: false. The back button is shown by
default: it calls onBack, or dismisses the screen when you give none. The search field is
in the bar by default; pass hideSearch: true to leave it out.Filtering Group Members
- SwiftUI
- UIKit
groupMembersRequestBuilder and searchRequestBuilder shape the request from the
first page; the default is the group’s guid, 30 a page.- SwiftUI
- UIKit
searchKeyword puts a keyword in the field, which searches. excludeOwner hides the
owner’s row.Who May Do What
A row’s actions depend on who is looking at it.
Nobody is offered an action on their own row, and a moderator cannot ban.
Your scope is read from your own row, among the rows on screen. Until that row is
loaded — it is on a later page, or a search has filtered it out — you count as a participant
and no row offers an action. The owner is recognised by the group’s owner uid, whatever is
loaded.
- SwiftUI
- UIKit
Turn an action off for everyone with
disableKick, disableBan or disableChangeScope.Actions and Events
Callback Methods
- SwiftUI
- UIKit
Kick, ban and change scope
Each permitted action appears twice on a row: as a trailing swipe action and in the long-press menu.- Kick and Ban ask first, in an alert titled “Kick Alice ?” or “Ban Alice ?” — “Are You sure you want to kick Alice?” — with a destructive Yes and No.
- Scope opens a sheet listing all three scopes with the member’s current one selected. A scope you may not give — Admin, when you are a moderator — is listed and disabled. Save sends the selected scope, also when it is the one the member already has.
- SwiftUI
- UIKit
When an action succeeds the row is removed or updated, and the Kit’s other components are
told through
CometChatEvents. When it fails, the list is left as it was, onError is
called and the error’s message is shown as a snackbar — the Kit’s toast, which the list
presents itself from the store’s toast.onError too. The error state, with Retry, is shown only
when nothing is loaded.
SDK Events (Real-Time, Automatic)
No wiring required — the store listens and the list updates itself.- SwiftUI
- UIKit
Functionality
- SwiftUI
- UIKit
Custom View Slots
- SwiftUI
- UIKit
Every slot is available as an initialiser argument and as a modifier that cascades to every
CometChatGroupMembers below it. Supply both and the initialiser argument wins.Slot closures receive a
ChatGroupMember — the row’s value type (id, name,
avatarURL, isOnline, scope).The scope chip stays whatever you supply: a custom
tailView is drawn after it and a
custom subtitleView under the name. A custom errorView replaces the built-in screen
and its Retry; call store.retry() from your own button.Menu Options
- SwiftUI
- UIKit
addOptions are shown after the built-in actions. A non-empty options replaces the
built-in actions, and addOptions still follows it.Advanced Methods
Selection
- SwiftUI
- UIKit
selected — bind selection to follow each change — and the tick calls onSelection with
the selected uids. The selection and the mode stay afterwards. The discard button clears the
selection and leaves selection mode; the mode comes back when you pass a different
selectionMode.In .single mode a tap replaces the selection, and a second tap on the selected row
deselects it. In .multiple mode a tap adds a member or removes a selected one. With
furtherSelectionEnabled: false a tap can deselect a member and cannot select another.
Changing selectionMode clears the selection, and a member who leaves the list leaves the
selection.Store Access
- SwiftUI
- UIKit
GroupMembersStore also exposes search(_:), fetchGroupMembers(), retry(), kick(_:),
ban(_:), changeScope(_:to:), options(for:), assignableScopes(for:), viewerScope,
toast — the snackbar waiting to be shown — and the list operations addItem, insertItem,
removeItem, updateItem and clearItems.Subclassing
- SwiftUI
- UIKit
CometChatGroupMembers is a View struct. Customise it with its slots, modifiers and style.Style
- SwiftUI
- UIKit
On iOS 26 the navigation bar is Liquid Glass and the Kit leaves it to the system. Below
iOS 26, or with Reduce Transparency on, the bar is filled with the list’s background.
Setting
navigationBarBackgroundColor fills it everywhere.Next Steps
Groups
The list of groups a member belongs to
Users
The directory of users to add as members
Group Chat
Create, join and manage groups
Component Styling
Style every component