> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-feature-card-builder.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Group Members

> Group Members — CometChat documentation.

## Overview

`CometChatGroupMembers` is a [Component](/ui-kit/react-native/v4/components-overview#components) that displays all users added or invited to a group, granting them access to group discussions, shared content, and collaborative features. Group members can communicate in real-time via messaging, voice and video calls, and other activities. They can interact, share files, and join calls based on group permissions set by the administrator or owner.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/wpH0oTjPapnxuXny/images/ca9b1a5c-group_members_overview_cometchat_screens-8de07b57474c0e4c49cbce17f694d817.png?fit=max&auto=format&n=wpH0oTjPapnxuXny&q=85&s=56498aabc113751da0226ac42b4ca038" alt="Image" width="4498" height="3120" data-path="images/ca9b1a5c-group_members_overview_cometchat_screens-8de07b57474c0e4c49cbce17f694d817.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/tKDtB3xjE6jATqmt/images/06d3cb13-group_members_overview_cometchat_screens-8c2c468f6aee48e0561a1a5394f70446.png?fit=max&auto=format&n=tKDtB3xjE6jATqmt&q=85&s=70051764ee9f80ba33a9d8cee20defe3" alt="Image" width="4498" height="3120" data-path="images/06d3cb13-group_members_overview_cometchat_screens-8c2c468f6aee48e0561a1a5394f70446.png" />
  </Tab>
</Tabs>

***

## Usage

### Integration

The following code snippet illustrates how you can directly incorporate the Group Members component into your Application.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      return (
        <>
          {group && <CometChatGroupsMembers group={group}></CometChatGroupsMembers>}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

### Actions

[Actions](/ui-kit/react-native/v4/components-overview#actions) dictate how a component functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the component to fit your specific needs.

##### 1. onSelect

The `onSelect` action is activated when you select the done icon while in selection mode. This returns a list of all the group members that you have selected.

This action does not come with any predefined behavior. However, you have the flexibility to override this event and tailor it to suit your needs using the following code snippet.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const onSelectionHandler = (list: CometChat.GroupMember[]) => {
        //code
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              selectionMode="multiple"
              onSelection={onSelectionHandler}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 2. onItemPress

The `onItemPress` event is activated when you click on the Group Members List item. This action does not come with any predefined behavior. However, you have the flexibility to override this event and tailor it to suit your needs using the following code snippet.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const onGroupMemberPressHandler = (groupMember: CometChat.GroupMember) => {
        //code
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              onItemPress={onGroupMemberPressHandler}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 2. onItemLongPress

The `onItemLongPress` event is activated when you click on the Group Members List item. This action does not come with any predefined behavior. However, you have the flexibility to override this event and tailor it to suit your needs using the following code snippet.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const onGroupMemberLongPressHandler = (
        groupMember: CometChat.GroupMember
      ) => {
        //code
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              onItemLongPress={onGroupMemberLongPressHandler}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 3. OnBack

`OnBack` is triggered when you click on the back button of the Group Members component. You can override this action using the following code snippet.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const onBackHandler = (groupMember: CometChat.GroupMember) => {
        //code
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              onBack={onBackHandler}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 4. onError

This action doesn't change the behavior of the component but rather listens for any errors that occur in the Group Membets component.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const onErrorHandler = (error: CometChat.CometChatException) => {
        //code
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              onError={onErrorHandler}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

### Filters

**Filters** allow you to customize the data displayed in a list within a Component. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using RequestBuilders of Chat SDK.

##### 1. GroupMembersRequestBuilder

The [GroupMembersRequestBuilder](/sdk/react-native/retrieve-group-members) enables you to filter and customize the group members list based on available parameters in GroupMembersRequestBuilder. This feature allows you to create more specific and targeted queries when fetching groups. The following are the parameters available in [GroupMembersRequestBuilder](/sdk/react-native/retrieve-group-members)

| Methods              | Type           | Description                                                                                       |
| -------------------- | -------------- | ------------------------------------------------------------------------------------------------- |
| **setLimit**         | number         | sets the number of group members that can be fetched in a single request, suitable for pagination |
| **setSearchKeyword** | string         | used for fetching group members matching the passed string                                        |
| **setScopes**        | Array\<string> | used for fetching group members based on multiple scopes                                          |

**Example**

In the example below, we are applying a filter to the Group Members by setting the limit to two and setting the scope to show only admin and moderator.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);
      let groupMemberRequestBuilder;

      const getGroup = async () => {
        const group = await CometChat.getGroup("mrc-uid");
        groupMemberRequestBuilder = new CometChat.GroupMembersRequestBuilder(
          group.getGuid()
        ).setScopes(["admin"]);
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const onErrorHandler = (error: CometChat.CometChatException) => {
        //code
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              groupMemberRequestBuilder={groupMemberRequestBuilder}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 2. SearchRequestBuilder

The SearchRequestBuilder uses [GroupMembersRequestBuilder](/sdk/react-native/retrieve-group-members) enables you to filter and customize the search list based on available parameters in GroupMembersRequestBuilder. This feature allows you to keep uniformity between the displayed Group Members List and searched Group Members List.

**Example**

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);
      let searchRequestBuilder;

      const getGroup = async () => {
        const group = await CometChat.getGroup("mrc-uid");
        searchRequestBuilder = new CometChat.GroupMembersRequestBuilder(
          group.getGuid()
        )
          .setScopes(["admin"])
          .setSearchKeyword("some-search-keyword");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              groupMemberRequestBuilder={searchRequestBuilder}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

### Events

[Events](/ui-kit/react-native/v4/components-overview#events) are emitted by a `Component`. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.

Events emitted by the Group Members component is as follows.

| Event                         | Description                                                       |
| ----------------------------- | ----------------------------------------------------------------- |
| **ccGroupMemberBanned**       | Triggers when the group member banned from the group successfully |
| **ccGroupMemberKicked**       | Triggers when the group member kicked from the group successfully |
| **ccGroupMemberScopeChanged** | Triggers when the group member scope is changed in the group      |

<Tabs>
  <Tab title="Adding Listeners">
    ```tsx theme={null}
    import { CometChatUIEventHandler } from "@cometchat/chat-uikit-react-native";

    CometChatUIEventHandler.addGroupListener("GROUP_LISTENER_ID", {
      ccGroupMemberBanned: ({
        message,
        kickedUser,
        kickedBy,
        kickedFrom,
      }: {
        message: CometChat.BaseMessage,
        kickedUser: CometChat.User,
        kickedBy: CometChat.User,
        kickedFrom: CometChat.Group,
      }) => {
        //code
      },
      ccGroupMemberKicked: ({
        message,
        kickedFrom,
      }: {
        message: CometChat.BaseMessage,
        kickedFrom: CometChat.Group,
      }) => {
        //code
      },
      ccGroupMemberScopeChanged: ({
        action,
        updatedUser,
        scopeChangedTo,
        scopeChangedFrom,
        group,
      }) => {
        //code
      },
    });
    ```
  </Tab>
</Tabs>

***

<Tabs>
  <Tab title="Removing Listeners">
    ```tsx theme={null}
    import { CometChatUIEventHandler } from "@cometchat/chat-uikit-react-native";

    CometChatUIEventHandler.removeGroupListener("GROUP_LISTENER_ID");
    ```
  </Tab>
</Tabs>

***

## Customization

To fit your app's design requirements, you can customize the appearance of the Group Members component. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.

### Style

Using **Style** you can **customize** the look and feel of the component in your app, These parameters typically control elements such as the **color**, **size**, **shape**, and **fonts** used within the component.

##### 1. GroupMembers Style

You can set the `GroupMembersStyle` to the Group Members Component to customize the styling.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/fYzY4CDkBxaMi0xU/images/12a6258c-group_members_style_cometchat_screens-00f1aa0c9eae6cbd462c7e33272ae920.png?fit=max&auto=format&n=fYzY4CDkBxaMi0xU&q=85&s=b5fa77241f015ad9dff3a84dd247fdd6" alt="Image" width="4498" height="3120" data-path="images/12a6258c-group_members_style_cometchat_screens-00f1aa0c9eae6cbd462c7e33272ae920.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/PYvStVSPtwB5oVeC/images/c46bec38-group_members_style_cometchat_screens-b31974d0f23a55c317e1130ca25cf7ec.png?fit=max&auto=format&n=PYvStVSPtwB5oVeC&q=85&s=177fbd1bcc2c33218efd2de603b1f446" alt="Image" width="4498" height="3120" data-path="images/c46bec38-group_members_style_cometchat_screens-b31974d0f23a55c317e1130ca25cf7ec.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatGroupsMembers,
      GroupMembersStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("mrc-uid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const groupMemberStyle: GroupMembersStyleInterface = {
        titleColor: "red",
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              groupMemberStyle={groupMemberStyle}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

List of properties exposed by GroupMembersStyle:

| Property               | Description                        | Code                                   |
| ---------------------- | ---------------------------------- | -------------------------------------- |
| **border**             | Used to set border                 | `border?: BorderStyleInterface,`       |
| **borderRadius**       | Used to set border radius          | `borderRadius?: number;`               |
| **backgroundColor**    | Used to set background colour      | `backgroundColor?: string;`            |
| **height**             | Used to set height                 | `height?: string` \| `number ;`        |
| **width**              | Used to set width                  | `width?: string` \| `number ;`         |
| **titleFont**          | Used to set title text font        | `titleFont?: FontStyleInterface,`      |
| **titleColor**         | Used to set title text color       | `titleColor?: string;`                 |
| **backIconTint**       | Used to set back button icon tint  | `backIconTint?: string;`               |
| **searchBorder**       | Used to set search border          | `searchBorder?: BorderStyleInterface;` |
| **searchBorderRadius** | Used to set search border radius   | `searchBorderRadius?: number;`         |
| **searchTextFont**     | Used to set search text font       | `searchTextFont?: FontStyleInterface;` |
| **searchTextColor**    | Used to set search text color      | `searchTextColor?: string;`            |
| **searchIconTint**     | Used to set search icon tint       | `searchIconTint?: string;`             |
| **onlineStatusColor**  | Used to set online status color    | `onlineStatusColor?: string;`          |
| **separatorColor**     | Used to set separator color        | `separatorColor?: string;`             |
| **loadingIconTint**    | Used to set loading icon tint      | `loadingIconTint?: string;`            |
| **emptyTextFont**      | Used to set empty state text font  | `emptyTextFont?: FontStyleInterface;`  |
| **emptyTextColor**     | Used to set empty state text color | `emptyTextColor?: string;`             |
| **errorTextFont**      | Used to set error state text font  | `errorTextFont?: FontStyleInterface;`  |
| **errorTextColor**     | Used to set error state text color | `errorTextColor?: string;`             |

##### 2. GroupScope Style

You can set the `GroupScope` to the Group Members Component to customize the styling.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/dQDh-qNy-2PyfeNi/images/d2b68f4e-group_members_scope_style_cometchat_screens-e34bb9f7ca9889d8c0beb652b118431a.png?fit=max&auto=format&n=dQDh-qNy-2PyfeNi&q=85&s=6d1130743b0b75ca5f2385540f332966" alt="Image" width="4498" height="3120" data-path="images/d2b68f4e-group_members_scope_style_cometchat_screens-e34bb9f7ca9889d8c0beb652b118431a.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/p-BaO12CMdpnxKfV/images/258f2515-group_members_scope_style_cometchat_screens-c04cd4d70ed799a58f11c55f4521a073.png?fit=max&auto=format&n=p-BaO12CMdpnxKfV&q=85&s=41a4de61e1ce474a318b08f572a2c8c7" alt="Image" width="4498" height="3120" data-path="images/258f2515-group_members_scope_style_cometchat_screens-c04cd4d70ed799a58f11c55f4521a073.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatGroupsMembers,
      GroupScopeStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("mrc-uid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const groupScopeStyle: GroupScopeStyleInterface = {
        optionTextColor: "red",
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              groupScopeStyle={groupScopeStyle}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

List of properties exposed by ChangeScopeStyle:

| Property                          | Description                                  | Code                                           |
| --------------------------------- | -------------------------------------------- | ---------------------------------------------- |
| **border**                        | Used to set border                           | `border?: BorderStyleInterface,`               |
| **borderRadius**                  | Used to set border radius                    | `borderRadius?: number;`                       |
| **backgroundColor**               | Used to set background colour                | `backgroundColor?: string;`                    |
| **height**                        | Used to set height                           | `height?: string` \| `number ;`                |
| **width**                         | Used to set width                            | `width?: string` \| `number ;`                 |
| **optionTextFont**                | Used to set option text font                 | `optionTextFont?: FontStyleInterface`          |
| **optionTextColor**               | Used to set option text color                | `optionTextColor?: string;`                    |
| **optionBackgroundColor**         | Used to set option background color          | `optionBackgroundColor?: string;`              |
| **optionBorder**                  | Used to set option border                    | `optionBorder?: BorderStyleInterface;`         |
| **optionBorderRadius**            | Used to set option border radius             | `optionBorderRadius?: number;`                 |
| **arrowIconTint**                 | Used to set arrow icon tint                  | `arrowIconTint?: string;`                      |
| **selectedOptionTextFont**        | Used to set selected option text font        | `selectedOptionTextFont?: FontStyleInterface,` |
| **selectedOptionTextColor**       | Used to set selected option text color       | `selectedOptionTextColor?: string;`            |
| **selectedOptionBackgroundColor** | Used to set selected option background color | `selectedOptionBackgroundColor?: string;`      |
| **selectedOptionBorder**          | Used to set selected option border           | `selectedOptionBorder?: BorderStyleInterface;` |
| **selectedOptionBorderRadius**    | Used to set selected option border radius    | `selectedOptionBorderRadius?: number;`         |

##### 3. Avatar Style

To apply customized styles to the `Avatar` component in the Group Members Component, you can use the following code snippet. For further insights on `Avatar` Styles [refer](/ui-kit/react-native/v4/avatar)

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatGroupsMembers,
      AvatarStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("mrc-uid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const avatarStyle: AvatarStyleInterface = {
        outerViewSpacing: 5,
        outerView: {
          borderWidth: 2,
          borderStyle: "dotted",
          borderColor: "blue",
        },
        border: borderStyle,
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              avatarStyle={avatarStyle}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 4. ListItem Style

To apply customized styles to the `ListItemStyle` component in the `Group Members` Component, you can use the following code snippet. For further insights on `ListItemStyle` Styles [refer](/ui-kit/react-native/v4/list-item)

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatGroupsMembers,
      ListItemStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("mrc-uid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const listItemStyle: ListItemStyleInterface = {
        titleColor: "red",
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              listItemStyle={listItemStyle}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 5. StatusIndicator Style

To apply customized styles to the Status Indicator component in the Group Members Component, You can use the following code snippet. For further insights on Status Indicator Styles [refer](/ui-kit/react-native/v4/status-indicator)

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatGroupsMembers,
      StatusIndicatorStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("mrc-uid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const statusIndicatorStyle: StatusIndicatorStyleInterface = {
        backgroundColor: "grey",
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              statusIndicatorStyle={statusIndicatorStyle}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

### Functionality

These are a set of small functional customizations that allow you to fine-tune the overall experience of the component. With these, you can change text, set custom icons, and toggle the visibility of UI elements.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatGroupsMembers,
      StatusIndicatorStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const statusIndicatorStyle: StatusIndicatorStyleInterface = {
        backgroundColor: "grey",
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              title="List Of Group Members"
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/v-eSvFFm_r_istSu/images/2b7545f8-group_members_function_cometchat_screens-4194639de399268172fdf9a159eece95.png?fit=max&auto=format&n=v-eSvFFm_r_istSu&q=85&s=a4ccb27c9189140cc602e100c77f7e1d" alt="Image" width="4498" height="3120" data-path="images/2b7545f8-group_members_function_cometchat_screens-4194639de399268172fdf9a159eece95.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/PYvStVSPtwB5oVeC/images/c606fe3e-group_members_function_cometchat_screens-f66aeeab3e44c76c3cdb43de6a29ecb2.png?fit=max&auto=format&n=PYvStVSPtwB5oVeC&q=85&s=ca7aa576cf5b5bc13cb7875cabfcdc06" alt="Image" width="4498" height="3120" data-path="images/c606fe3e-group_members_function_cometchat_screens-f66aeeab3e44c76c3cdb43de6a29ecb2.png" />
  </Tab>
</Tabs>

Below is a list of customizations along with corresponding code snippets

| Property                                                     | Description                                                                                          | Code                                                   |
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| **title**                                                    | Used to set title in the app heading                                                                 | `title?: string`                                       |
| **errorStateText**                                           | Used to set a custom text response when some error occurs on fetching the list of group members      | `errorStateText?: string`                              |
| **emptyStateText**                                           | Used to set a custom text response when fetching the group members has returned an empty list        | `emptyStateText?: string`                              |
| **searchBoxIcon**                                            | Used to set search Icon in the search field                                                          | `searchBoxIcon?: ImageType`                            |
| **showBackButton**                                           | Used to show or hide back button                                                                     | `showBackButton?: boolean`                             |
| **backButtonIcon**                                           | Used to set the back button Icon                                                                     | `backButtonIcon?: ImageType`                           |
| **hideError**                                                | Used to hide error on fetching groups                                                                | `hideError?: boolean`                                  |
| **hideSearch**                                               | Used to toggle visibility for search box                                                             | `hideSearch?: boolean`                                 |
| **hideSeparator**                                            | Used to hide the divider separating the user items                                                   | `hideSeparator?: boolean`                              |
| **disableUsersPresence**                                     | Used to toggle functionality to show user's presence                                                 | `disableUsersPresence?: boolean`                       |
| **selectionMode**                                            | set the number of group members that can be selected, SelectionMode can be single, multiple or none. | `selectionMode?: 'none'` \| `'single'` \| `'multiple'` |
| **group** <Tooltip tip="Not available">🛑</Tooltip>          | Used to pass group object of which group members will be shown                                       | `group: CometChat.Group`                               |
| **searchPlaceholder**                                        | Used to set custom search placeholder text                                                           | `searchPlaceholder='Custom Search PlaceHolder'`        |
| **hideSubmitIcon** <Tooltip tip="Not available">🛑</Tooltip> | Used to hide the submit button                                                                       | `hideSubmitIcon?: boolean`                             |

***

### Advance

For advanced-level customization, you can set custom views to the component. This lets you tailor each aspect of the component to fit your exact needs and application aesthetics. You can create and define your views, layouts, and UI elements and then incorporate those into the component.

***

#### ListItemView

With this property, you can assign a custom ListItem to the Group Members Component.

**Example**

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/fYzY4CDkBxaMi0xU/images/185cf61d-group_members_list_item_view_cometchat_screens-1858baf8cdc55d96ebac01b44c5564cf.png?fit=max&auto=format&n=fYzY4CDkBxaMi0xU&q=85&s=37af85660f15735369f11707a374a601" alt="Image" width="4498" height="3120" data-path="images/185cf61d-group_members_list_item_view_cometchat_screens-1858baf8cdc55d96ebac01b44c5564cf.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/F1NBmCh5qoHS2CIE/images/d8a5e60b-group_members_list_item_view_cometchat_screens-bf33bef6c42ac84bdd01529f3eea455d.png?fit=max&auto=format&n=F1NBmCh5qoHS2CIE&q=85&s=360cd6eeca84f0158bcf379cf432c496" alt="Image" width="4498" height="3120" data-path="images/d8a5e60b-group_members_list_item_view_cometchat_screens-bf33bef6c42ac84bdd01529f3eea455d.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const viewStyle: StyleProp<ViewStyle> = {
        flex: 1,
        flexDirection: "row",
        alignItems: "flex-start",
        padding: 10,
        borderColor: "black",
        borderWidth: 1,
        backgroundColor: "#E8EAE9",
        borderRadius: 10,
        margin: 2,
      };

      const getGroupMemberListItemView = (item: any) => {
        let user = item;
        return (
          <View style={viewStyle}>
            <CometChatAvatar
              image={user.avatar ? { uri: user.avatar } : undefined}
              name={user.name}
            />

            <View>
              <Text style={{ color: "black", fontWeight: "bold" }}>
                {user.name}
              </Text>
              <Text style={{ color: "#667" }}>{user.status}</Text>
            </View>
          </View>
        );
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              ListItemView={getGroupMemberListItemView}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### SubtitleView

You can customize the subtitle view for each group members to meet your requirements

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/PYvStVSPtwB5oVeC/images/beea53a6-group_members_subtitle_view_cometchat_screens-ba3d4940add58733f8f46f68893fc22e.png?fit=max&auto=format&n=PYvStVSPtwB5oVeC&q=85&s=826dcac05e8a24e2c4f9ffcca65b8129" alt="Image" width="4498" height="3120" data-path="images/beea53a6-group_members_subtitle_view_cometchat_screens-ba3d4940add58733f8f46f68893fc22e.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/U1KbQ0VSXjjiH44y/images/535d4665-group_members_subtitle_view_cometchat_screens-778c8ac01b5dace1a8d379fa719585a2.png?fit=max&auto=format&n=U1KbQ0VSXjjiH44y&q=85&s=21892778fcecfcb1f9a90b8d885a8a0f" alt="Image" width="4498" height="3120" data-path="images/535d4665-group_members_subtitle_view_cometchat_screens-778c8ac01b5dace1a8d379fa719585a2.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const viewStyle: StyleProp<ViewStyle> = {
        flex: 1,
        flexDirection: "row",
        alignItems: "flex-start",
        padding: 10,
        borderColor: "black",
        borderWidth: 1,
        backgroundColor: "#E8EAE9",
        borderRadius: 10,
        margin: 2,
      };

      const getGroupMemberSubtitleView = (user) => {
        return (
          <Text
            style={{
              fontSize: 12,
              color: theme.palette.getAccent800(),
            }}
          >
            Last Active At:{" "}
            {user?.lastActiveAt ? formatTime(user?.lastActiveAt) : "--"}
          </Text>
        );
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              SubtitleView={getGroupMemberSubtitleView}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### TailView

You can customize the tail view for each group members to meet your requirements

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/v-eSvFFm_r_istSu/images/2ea3d82c-group_members_tail_view_cometchat_screens-dc9eed8aa1535c8432b8d4a25b8a7a08.png?fit=max&auto=format&n=v-eSvFFm_r_istSu&q=85&s=67203666baddc9727ec86786f64aaf3b" alt="Image" width="4498" height="3120" data-path="images/2ea3d82c-group_members_tail_view_cometchat_screens-dc9eed8aa1535c8432b8d4a25b8a7a08.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/wpH0oTjPapnxuXny/images/c6c197f0-group_members_tail_view_cometchat_screens-a3531ddb2c614ab8480e5e627cb0c358.png?fit=max&auto=format&n=wpH0oTjPapnxuXny&q=85&s=a8dafdf202632760b15713b38b6e9dd3" alt="Image" width="4498" height="3120" data-path="images/c6c197f0-group_members_tail_view_cometchat_screens-a3531ddb2c614ab8480e5e627cb0c358.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const getTailView = (user) => {
        return (
          <Text
            style={{
              fontSize: 12,
              color: theme.palette.getAccent800(),
            }}
          >
            {user.status}
          </Text>
        );
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              TailView={getTailView}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### EmptyStateView

You can set a custom `EmptyStateView` using `emptyStateView` to match the empty view of your app.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const emptyViewStyle: StyleProp<ViewStyle> = {
        flex: 1,
        alignItems: "center",
        justifyContent: "center",
        padding: 10,
        borderColor: "black",
        borderWidth: 1,
        backgroundColor: "#E8EAE9",
      };

      const getGroupMemberEmptyStateView = () => {
        return (
          <View style={emptyViewStyle}>
            <Text style={{ fontSize: 80, color: "black" }}>Empty</Text>
          </View>
        );
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              EmptyStateView={getGroupMemberEmptyStateView}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### ErrorStateView

You can set a custom `ErrorStateView` using `errorStateView` to match the error view of your app.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const errorViewStyle: StyleProp<ViewStyle> = {
        flex: 1,
        alignItems: "center",
        justifyContent: "center",
        padding: 10,
        borderColor: "black",
        borderWidth: 1,
        backgroundColor: "#E8EAE9",
      };

      const getGroupMemberErrorStateView = () => {
        return (
          <View style={errorViewStyle}>
            <Text></Text>
          </View>
        );
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              ErrorStateView={getGroupMemberErrorStateView}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### AppBarOptions

You can set the Custom Menu view to add more options to the Group Members component.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/GQCy4V9W9Tf76kX8/images/4c4d85f3-group_members_app_bar_options_cometchat_screens-8b2dbc1c441b794ea46c4f7d68514ad6.png?fit=max&auto=format&n=GQCy4V9W9Tf76kX8&q=85&s=f1fb4e8c73a40b25bcc7ba140b071d65" alt="Image" width="4498" height="3120" data-path="images/4c4d85f3-group_members_app_bar_options_cometchat_screens-8b2dbc1c441b794ea46c4f7d68514ad6.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/lojUhXqO8ysHzRtp/images/b3275cac-group_members_app_bar_options_cometchat_screens-b589ebbefa9f720f257aff860cc04f77.png?fit=max&auto=format&n=lojUhXqO8ysHzRtp&q=85&s=cfb0a82d002b6503e1bc852f086b769b" alt="Image" width="4498" height="3120" data-path="images/b3275cac-group_members_app_bar_options_cometchat_screens-b589ebbefa9f720f257aff860cc04f77.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const styles = StyleSheet.create({
        button: {
          height: 20,
          width: 20,
          borderRadius: 0,
          backgroundColor: "transparent",
        },
        image: {
          height: 20,
          width: 20,
          tintColor: "#7E57C2",
        },
      });

      const getAppBarOptions = () => {
        return (
          <TouchableOpacity
            style={styles.button}
            onPress={() => {
              /*code*/
            }}
          >
            <Image source={Notification} style={styles.image} />
          </TouchableOpacity>
        );
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              AppBarOptions={getAppBarOptions}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### Swipe Options

You can set the Custom Swipe options to the Add Members component.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/cEj5TXvU_reIGZbk/images/1f35541d-group_members_options_cometchat_screens-2509261c1ef20106dfa24b912c9872d9.png?fit=max&auto=format&n=cEj5TXvU_reIGZbk&q=85&s=ef4fa92a17702ece20c0cb9909d32c04" alt="Image" width="4498" height="3120" data-path="images/1f35541d-group_members_options_cometchat_screens-2509261c1ef20106dfa24b912c9872d9.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-feature-card-builder/MoukXfOA8-IbkyPZ/images/3daa7d90-group_members_options_cometchat_screens-8001e91d06748c3f5bac23ec605bfc89.png?fit=max&auto=format&n=MoukXfOA8-IbkyPZ&q=85&s=748e48e519189d9ef9483d0f3a0b5a5e" alt="Image" width="4498" height="3120" data-path="images/3daa7d90-group_members_options_cometchat_screens-8001e91d06748c3f5bac23ec605bfc89.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatGroupsMembers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [group, setGroup] = useState<CometChat.Group | undefined>(undefined);

      const getGroup = async () => {
        const group = await CometChat.getGroup("guid");
        setGroup(group);
      };

      useEffect(() => {
        //login
        getGroup();
      });

      const getGroupMemberCustomOptions = (item: CometChat.GroupMember) => {
        const customOption: CometChatOptions = {
          id: "custom id",
          title: "Call",
          icon: Call,
          iconTint: "#7316f5",
          backgroundColor: "#93f5bf",
          onPress: () => console.log("custom action"),
        };

        return [customOption];
      };

      return (
        <>
          {group && (
            <CometChatGroupsMembers
              group={group}
              options={getGroupMemberCustomOptions}
            ></CometChatGroupsMembers>
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***
