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

# Users

> Users — CometChat documentation.

## Overview

The Users is a [Component](/ui-kit/react-native/v4/components-overview#components), showcasing an accessible list of all available users. It provides an integral search functionality, allowing you to locate any specific user swiftly and easily. For each user listed, the widget displays the user's name by default, in conjunction with their avatar when available. Furthermore, it includes a status indicator, visually informing you whether a user is currently online or offline.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/ugckbRl5Q-H7t8X2/images/e245494b-overview_cometchat_screens_users-47c1a7295054d45b4edb7acd78eb423d.png?fit=max&auto=format&n=ugckbRl5Q-H7t8X2&q=85&s=fc605949a166f3590ebaed6d2cb6b1c2" alt="Image" width="4498" height="3120" data-path="images/e245494b-overview_cometchat_screens_users-47c1a7295054d45b4edb7acd78eb423d.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/7emVxEQ5MCxvzC60/images/194bb259-overview_cometchat_screens_users-f1647c6f00e004685b51c75e7bd88cbb.png?fit=max&auto=format&n=7emVxEQ5MCxvzC60&q=85&s=9eeee656a49263a7df38206f8a3b3e6b" alt="Image" width="4498" height="3120" data-path="images/194bb259-overview_cometchat_screens_users-f1647c6f00e004685b51c75e7bd88cbb.png" />
  </Tab>
</Tabs>

The Users component is composed of the following BaseComponents:

| Components                                    | Description                                                                                                             |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| CometChatList                                 | a reusable container component having title, search box, customisable background and a List View                        |
| [ListItem](/ui-kit/react-native/v4/list-item) | a component that renders data obtained from a User object on a Tile having a title, subtitle, leading and trailing view |

***

## Usage

### Integration

The following code snippet illustrates how you can directly incorporate the Users component into your `App.tsx` file.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    return <CometChatUsers />;
    ```
  </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. onSelection

The `onSelection` event is activated when you select the done icon in the Menubar while in selection mode. This returns a list of all the users 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 { CometChatUsers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const onSelectionHandler = (list: CometChat.User[]) => {
        //code
      };

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

##### 2. onItemPress

The `onItemPress` event is activated when you press on the UserList 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 { CometChatUsers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const onItemPresshandler = (user: CometChat.User) => {
        //code
      };

      return <CometChatUsers onItemPress={onItemPresshandler} />;
    }
    ```
  </Tab>
</Tabs>

##### 3. onItemLongPress

The `onItemLongPress` event is activated when you Long Press on the UserList 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 { CometChatUsers } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const onItemLongPresshandler = (user: CometChat.User) => {
        //code
      };

      return <CometChatUsers onItemLongPress={onItemLongPresshandler} />;
    }
    ```
  </Tab>
</Tabs>

##### 4. onBack

The `onBack` function is built to respond when you tap the back button in the Toolbar of the activity.

By default, this action has a predefined behavior: it simply closes the current activity. However, the flexibility of CometChat UI Kit allows you to override this standard behavior according to your application's specific requirements. You can define a custom action that will be performed instead when the back button is pressed.

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

    function App(): React.JSX.Element {
      const onBackHandler = () => {
        //code
      };

      return <CometChatUsers showBackButton={true} onBack={onBackHandler} />;
    }
    ```
  </Tab>
</Tabs>

##### 5. onError

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

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

    function App(): React.JSX.Element {
      const onErrorHandler = (error: CometChat.CometChatException) => {
        //code
      };

      return <CometChatUsers onError={onErrorHandler} />;
    }
    ```
  </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. UserRequestBuilder

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

| Methods              | Type           | Description                                                                            |
| -------------------- | -------------- | -------------------------------------------------------------------------------------- |
| **setLimit**         | number         | sets the number users that can be fetched in a single request, suitable for pagination |
| **setSearchKeyword** | string         | used for fetching users matching the passed string                                     |
| **hideBlockedUsers** | bool           | used for fetching all those users who are not blocked by the logged in user            |
| **friendsOnly**      | bool           | used for fetching only those users in which logged in user is a member                 |
| **setRoles**         | Array\<string> | used for fetching users containing the passed tags                                     |
| **setTags**          | Array\<string> | used for fetching users containing the passed tags                                     |
| **withTags**         | bool           | used for fetching users containing tags                                                |
| **setUserStatus**    | string         | used for fetching users by their status online or offline                              |
| **setUIDs**          | Array\<string> | used for fetching users containing the passed users                                    |

**Example**

In the example below, we are applying a filter to the UserList based on Friends.

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

    function App(): React.JSX.Element {
      const usersRequestBuilder = new CometChat.UsersRequestBuilder()
        .setLimit(5)
        .friendsOnly(true);

      return <CometChatUsers usersRequestBuilder={usersRequestBuilder} />;
    }
    ```
  </Tab>
</Tabs>

##### 2. SearchRequestBuilder

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

**Example**

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

    function App(): React.JSX.Element {
      const usersRequestBuilder = new CometChat.UsersRequestBuilder()
        .setLimit(5)
        .setSearchKeyword("Alice");

      return <CometChatUsers searchRequestBuilder={usersRequestBuilder} />;
    }
    ```
  </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.

The users component does not produce any events directly.

## Customization

To fit your app's design requirements, you can customize the appearance of the conversation 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. Users Style

You can set the `UsersStyle` to the Users Component to customize the styling.

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

    function App(): React.JSX.Element {
      const usersStyle: CometChatListStylesInterface = {
        background: "#ddd7f7",
        titleColor: "#6851D6",
      };

      return <CometChatUsers usersStyle={usersStyle} />;
    }
    ```
  </Tab>
</Tabs>

List of properties exposed by MessageListStyle

| Property                   | Description                                                                              | Code                                         |
| -------------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------- |
| **background**             | Used to set the background color                                                         | `background?: string`                        |
| **border**                 | Used to set border width                                                                 | `border?: BorderStyleInterface`              |
| **borderRadius**           | Used to set border radius                                                                | `borderRadius?: number`                      |
| **titleFont**              | Used to set the title font                                                               | `titleFont?: FontStyleInterface`             |
| **titleColor**             | Used to set the color of the title                                                       | `titleColor?: string`                        |
| **backIconTint**           | Used to set the tint for back icon                                                       | `backIconTint?: string`                      |
| **searchBorder**           | Used to set the border for the search box                                                | `searchBorder?: BorderStyleInterface`        |
| **searchBorderRadius**     | Used to set the border radius of the search box                                          | `searchBorderRadius?: number`                |
| **searchBackground**       | Used to set the background color for the search box                                      | `searchBackground?: string`                  |
| **searchTextFont**         | Used to set the font for the search box                                                  | `searchTextFont?: FontStyleInterface`        |
| **searchTextColor**        | Used to set the color for the search box text                                            | `searchTextColor?: string`                   |
| **searchIconTint**         | Used to set the color of the search icon in the search box                               | `searchIconTint?: string`                    |
| **SearchBorderWidth**      | Used to set the border width of the search box                                           | `setSearchBorderWidth(int)`                  |
| **loadingIconTint**        | Used to set the color of the icon shown while the list of group members is being fetched | `loadingIconTint?: string`                   |
| **emptyTextFont**          | Used to set the font for the empty state (when user list is empty)                       | `searchTextFont?: FontStyleInterface`        |
| **emptyTextColor**         | Used to set the text color for the empty state (when user list is empty)                 | `searchTextColor?: string`                   |
| **onlineStatusColor**      | Used to set the color of the status indicator shown if a group member is online          | `onlineStatusColor?: string`                 |
| **separatorColor**         | Used to set the color of the divider separating the user items                           | `separatorColor?: string`                    |
| **sectionHeaderTextFont**  | Used to set the font for the section header                                              | `sectionHeaderTextFont?: FontStyleInterface` |
| **sectionHeaderTextColor** | Used to set the color for the section header text                                        | `sectionHeaderTextColor?: string`            |

##### 2. Avatar Style

To apply customized styles to the `Avatar` component in the Users 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 {
      CometChatUsers,
      CometChatListStylesInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const avatarStyle: AvatarStyleInterface = {
        outerViewSpacing: 5,
        outerView: {
          borderWidth: 2,
          borderStyle: "dotted",
          borderColor: "blue",
        },
        border: borderStyle,
      };

      return <CometChatUsers avatarStyle={avatarStyle} />;
    }
    ```
  </Tab>
</Tabs>

##### 3. StatusIndicator Style

To apply customized styles to the Status Indicator component in the Users 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 {
      CometChatUsers,
      CometChatListStylesInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const statusIndicatorStyle: StatusIndicatorStyleInterface = {
        backgroundColor: "grey",
      };

      return <CometChatUsers statusIndicatorStyle={statusIndicatorStyle} />;
    }
    ```
  </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 {
      CometChatUsers,
      CometChatListStylesInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const statusIndicatorStyle: StatusIndicatorStyleInterface = {
        backgroundColor: "grey",
      };

      return <CometChatUsers title="Contacts" showBackButton={true} />;
    }
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/ugckbRl5Q-H7t8X2/images/e1d15bc8-functionality_cometchat_screens-4fe66cd13ba2addbf4c45f4b1fee2521.png?fit=max&auto=format&n=ugckbRl5Q-H7t8X2&q=85&s=47dd0b36114c4c8a0774e2a0f02a8758" alt="Image" width="4498" height="3120" data-path="images/e1d15bc8-functionality_cometchat_screens-4fe66cd13ba2addbf4c45f4b1fee2521.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/XgQ9DxAoWn0btB5m/images/6051dd93-functionality_cometchat_screens-3fd7bb09e68bc1136ea413202c3f610f.png?fit=max&auto=format&n=XgQ9DxAoWn0btB5m&q=85&s=20e08234f1ddce98ff6671171bac574e" alt="Image" width="4498" height="3120" data-path="images/6051dd93-functionality_cometchat_screens-3fd7bb09e68bc1136ea413202c3f610f.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 bar                                                        | `title?: string;`                 |
| **searchPlaceholderText** | Used to set search placeholder text                                                     | `searchPlaceholderText?: string;` |
| **backButtonIcon**        | Used to set back button icon                                                            | `backButtonIcon?: ImageURISource` |
| **showBackButton**        | Used to toggle visibility for back button                                               | `showBackButton?: boolean`        |
| **searchBoxIcon**         | Used to set search Icon in the search field                                             | `searchBoxIcon?: ImageURISource`  |
| **hideSearch**            | Used to toggle visibility for search box                                                | `hideSearch?: boolean`            |
| **hideError**             | Used to hide error on fetching users                                                    | `hideError?: boolean`             |
| **hideSeparator**         | Used to hide the divider separating the user items                                      | `hideSeparator?: boolean`         |
| **disableUsersPresence**  | Used to control visibility of user indicator shown if user is online                    | `disableUsersPresence?: boolean`  |
| **selectionIcon**         | Used to override the default selection complete icon                                    | `selectionIcon?: ImageURISource`  |
| **emptyStateText**        | Used to set a custom text response when fetching the users has returned an empty list   | `emptyStateText?: string`         |
| **errorStateText**        | Used to set a custom text response when some error occurs on fetching the list of users | `errorStateText?: string`         |

***

### Advanced

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 function, you can assign a custom ListItem to the Users Component.

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

    function App(): React.JSX.Element {
      const viewStyle: StyleProp<ViewStyle> = {
        flex: 1,
        flexDirection: "row",
        alignItems: "flex-start",
        padding: 10,
        borderColor: "black",
        borderWidth: 1,
        backgroundColor: "#E8EAE9",
        borderRadius: 10,
        margin: 2,
      };

      const getListItemView = (info: { item: CometChat.User; index: number }) => {
        let user = info.item;
        return (
          <View style={viewStyle}>
            <CometChatAvatar
              image={user.getAvatar() ? { uri: user.getAvatar() } : undefined}
              name={user.getName()}
            />

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

      return <CometChatUsers ListItemView={getListItemView} />;
    }
    ```
  </Tab>
</Tabs>

**Example**

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/k0f_g7UwNe_JINeP/images/433b45c9-list_item_style_cometchat_screens-477e78d48eb6fa1a05f2779c94029ad9.png?fit=max&auto=format&n=k0f_g7UwNe_JINeP&q=85&s=95d52dd5bb5dcb9228a63b6636d58505" alt="Image" width="4498" height="3120" data-path="images/433b45c9-list_item_style_cometchat_screens-477e78d48eb6fa1a05f2779c94029ad9.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/mkn0UqPQ5BXljCV1/images/8fc7bcee-list_item_style_cometchat_screens-e14ac9448893d5e380647311f3881ea1.png?fit=max&auto=format&n=mkn0UqPQ5BXljCV1&q=85&s=fb77b7a2d12ec110c480c4a74166156f" alt="Image" width="4498" height="3120" data-path="images/8fc7bcee-list_item_style_cometchat_screens-e14ac9448893d5e380647311f3881ea1.png" />
  </Tab>
</Tabs>

***

#### AppBarOptions

You can set the Custom AppBarOptions to add more options to the Users component.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}

    import {CometChat} from '@cometchat/chat-sdk-react-native';
    import { CometChatUsers, CometChatListStylesInterface } from '@cometchat/chat-uikit-react-native';

    function App(): React.JSX.Element {

    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 (
    <CometChatUsers
         AppBarOptions={getAppBarOptions}
      />
    );
    }
    ```
  </Tab>
</Tabs>

**Example**

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/mNTojjz_O28of40c/images/f86dfd3a-appbar_cometchat_screens-2f84ac3e14d3401338b2757b86102a1a.png?fit=max&auto=format&n=mNTojjz_O28of40c&q=85&s=42b484a71ec746494901c7171e037d8a" alt="Image" width="4498" height="3120" data-path="images/f86dfd3a-appbar_cometchat_screens-2f84ac3e14d3401338b2757b86102a1a.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/jpEUuHUk-hvu4tQT/images/a3a1bcc1-appbar_cometchat_screens-893db1d552928103fe542d0542596caa.png?fit=max&auto=format&n=jpEUuHUk-hvu4tQT&q=85&s=ac57fa2ddf2716fd8a86f1f84aadb49b" alt="Image" width="4498" height="3120" data-path="images/a3a1bcc1-appbar_cometchat_screens-893db1d552928103fe542d0542596caa.png" />
  </Tab>
</Tabs>

***

#### LoadingStateView

You can set a custom loader view using `LoadingStateView` to match the loading view of your app.

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

    function App(): React.JSX.Element {
      const loadingViewStyle: StyleProp<ViewStyle> = {
        flex: 1,
        alignItems: "center",
        justifyContent: "center",
        padding: 10,
        borderColor: "black",
        borderWidth: 1,
        backgroundColor: "#E8EAE9",
      };

      const getLoadingStateView = () => {
        return (
          <View style={loadingViewStyle}>
            <Text style={{ fontSize: 20, color: "black" }}>Loading...</Text>
          </View>
        );
      };

      return <CometChatUsers LoadingStateView={getLoadingStateView} />;
    }
    ```
  </Tab>
</Tabs>

**Example**

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/21UBnagXOw-XG0Sv/images/acaa1c70-loading_cometchat_screens-12086e753dd980db0b38948c78ff57e5.png?fit=max&auto=format&n=21UBnagXOw-XG0Sv&q=85&s=fd135a869997e905f1bcf879f5a8a506" alt="Image" width="4498" height="3120" data-path="images/acaa1c70-loading_cometchat_screens-12086e753dd980db0b38948c78ff57e5.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/mkn0UqPQ5BXljCV1/images/95912f57-loading_cometchat_screens-f178eb8702acb7e72daac38a31c0d76b.png?fit=max&auto=format&n=mkn0UqPQ5BXljCV1&q=85&s=11869d9b793415c09d4896f7df6f564a" alt="Image" width="4498" height="3120" data-path="images/95912f57-loading_cometchat_screens-f178eb8702acb7e72daac38a31c0d76b.png" />
  </Tab>
</Tabs>

***

#### SubtitleView

You can customize the subtitle view for each user item to meet your requirements.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}

    import {CometChat} from '@cometchat/chat-sdk-react-native';
    import { CometChatUsers } from '@cometchat/chat-uikit-react-native';

    function App(): React.JSX.Element {

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

    return (
    <CometChatUsers
          SubtitleView={getSubtitleView}
      />
    );
    }
    ```
  </Tab>
</Tabs>

**Examples**

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/jpEUuHUk-hvu4tQT/images/a48172ba-subtitleView_cometchat_screens-235f7a267664d4e43043bea7d1f26989.png?fit=max&auto=format&n=jpEUuHUk-hvu4tQT&q=85&s=a82d562189cf322c2c440cc14ce8be10" alt="Image" width="4498" height="3120" data-path="images/a48172ba-subtitleView_cometchat_screens-235f7a267664d4e43043bea7d1f26989.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/19qJLi95IaEk2j9s/images/fff31318-subtitleView_cometchat_screens-1f5abf9140831de807eb73183822b8ff.png?fit=max&auto=format&n=19qJLi95IaEk2j9s&q=85&s=3b8d292d0a3d0a68c821073f65b98a9a" alt="Image" width="4498" height="3120" data-path="images/fff31318-subtitleView_cometchat_screens-1f5abf9140831de807eb73183822b8ff.png" />
  </Tab>
</Tabs>

***

#### TailView

You can customize the tail view for each user item to meet your requirements.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}

    import {CometChat} from '@cometchat/chat-sdk-react-native';
    import { CometChatUsers } from '@cometchat/chat-uikit-react-native';

    function App(): React.JSX.Element {

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

    return (
    <CometChatUsers
          TailView={getTailView}
      />
    );
    }
    ```
  </Tab>
</Tabs>

**Examples**

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/mkn0UqPQ5BXljCV1/images/986475cb-TailView_cometchat_screens-99490000f8fdc580ab562fa4add3fc9e.png?fit=max&auto=format&n=mkn0UqPQ5BXljCV1&q=85&s=cbc2fd01eb56ed394126cc7046b144e9" alt="Image" width="4498" height="3120" data-path="images/986475cb-TailView_cometchat_screens-99490000f8fdc580ab562fa4add3fc9e.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/3EDM5JvI4mnAULac/images/77e09273-TailView_cometchat_screens-54abb27f04d4b7f2d93ccb3024da9013.png?fit=max&auto=format&n=3EDM5JvI4mnAULac&q=85&s=7195eba320c3422c9dbb10a003149403" alt="Image" width="4498" height="3120" data-path="images/77e09273-TailView_cometchat_screens-54abb27f04d4b7f2d93ccb3024da9013.png" />
  </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 { CometChatUsers, CometChatListStylesInterface } from '@cometchat/chat-uikit-react-native';

    function App(): React.JSX.Element {

    const usersRequestBuilder = new CometChat.UsersRequestBuilder().setLimit(5).setSearchKeyword('user-does-not-exist');

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

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

    return (
    <CometChatUsers
          usersRequestBuilder={usersRequestBuilder}
          EmptyStateView={getEmptyStateView}
      />
    );
    }
    ```
  </Tab>
</Tabs>

**Examples**

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/Gp90C5sdVtuRR4t7/images/842c61f6-empty_cometchat_screens-15a8c882e1cd1063568affb8f0310107.png?fit=max&auto=format&n=Gp90C5sdVtuRR4t7&q=85&s=398d0038e4ffb844fee04fe571b5147a" alt="Image" width="4498" height="3120" data-path="images/842c61f6-empty_cometchat_screens-15a8c882e1cd1063568affb8f0310107.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/jpEUuHUk-hvu4tQT/images/aab67e56-empty_cometchat_screens-b6f48b93a3fad6a9f1a5544ec596cb72.png?fit=max&auto=format&n=jpEUuHUk-hvu4tQT&q=85&s=5013efcfbb0f736f7007df07b1af9988" alt="Image" width="4498" height="3120" data-path="images/aab67e56-empty_cometchat_screens-b6f48b93a3fad6a9f1a5544ec596cb72.png" />
  </Tab>
</Tabs>

***

#### Swipe Options

You can set the Custom options to the Users component.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}

    import {CometChat} from '@cometchat/chat-sdk-react-native';
    import { CometChatUsers, CometChatOptions } from '@cometchat/chat-uikit-react-native';

    function App(): React.JSX.Element {

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

    return (
      <CometChatUsers
          options={getCustomOptions}
      />

    );
    }
    ```
  </Tab>
</Tabs>

**Examples**

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/Gp90C5sdVtuRR4t7/images/8230e3f9-Swipe_Options_cometchat_screens-cfc5876454773fdcb14032126d743df8.png?fit=max&auto=format&n=Gp90C5sdVtuRR4t7&q=85&s=a0e68345c65f76844545f6ae5f832249" alt="Image" width="4498" height="3120" data-path="images/8230e3f9-Swipe_Options_cometchat_screens-cfc5876454773fdcb14032126d743df8.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-rn-guide-message-privately/ugckbRl5Q-H7t8X2/images/e64f9199-Swipe_Options_cometchat_screens-3c130a637e1b22830d781205c5a7c3dc.png?fit=max&auto=format&n=ugckbRl5Q-H7t8X2&q=85&s=73b0ec080df97ce5bf54d6585a0fed3b" alt="Image" width="4498" height="3120" data-path="images/e64f9199-Swipe_Options_cometchat_screens-3c130a637e1b22830d781205c5a7c3dc.png" />
  </Tab>
</Tabs>
