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

# Conversations With Messages

> Conversations With Messages — CometChat documentation.

## Overview

The ConversationsWithMessages is a [Composite Component](/ui-kit/angular/components-overview#composite-components) encompassing components such as [Conversations](/ui-kit/angular/conversations), [Messages](/ui-kit/angular/messages), and [Contacts](/ui-kit/angular/contacts). Each of these component contributes to the functionality and structure of the overall ConversationsWithMessages component.

<Frame>
  <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/B3XaZtq031kOZfI6/images/d5775c64-conversations_with_messages_overview_web_screens-fe8ad2df5b7987d7c7ce867733973596.png?fit=max&auto=format&n=B3XaZtq031kOZfI6&q=85&s=9a8119cde0cd11fc49afdd7fb1ca113a" width="3600" height="2400" data-path="images/d5775c64-conversations_with_messages_overview_web_screens-fe8ad2df5b7987d7c7ce867733973596.png" />
</Frame>

| Components                                     | Description                                                                                                                                            |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Conversations](/ui-kit/angular/conversations) | The `Conversations` component is designed to display a list of either `User` or `Group`. This essentially represents your recent conversation history. |
| [Messages](/ui-kit/angular/messages)           | The `Messages` component is designed to manage the messaging interaction for either individual `User` or `Group` conversations.                        |
| [Contacts](/ui-kit/angular/contacts)           | The `CometChatContacts` component is specifically designed to facilitate the display and management of both `User` and `Groups`.                       |

## Usage

### Integration

<Tabs>
  <Tab title="app.module.ts">
    ```ts theme={null}
    import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from "@angular/core";
    import { BrowserModule } from "@angular/platform-browser";
    import { CometChatConversationsWithMessages } from "@cometchat/chat-uikit-angular";
    import { AppComponent } from "./app.component";

    @NgModule({
      imports: [BrowserModule, CometChatConversationsWithMessages],
      declarations: [AppComponent],
      providers: [],
      bootstrap: [AppComponent],
      schemas: [CUSTOM_ELEMENTS_SCHEMA],
    })
    export class AppModule {}
    ```
  </Tab>

  <Tab title="app.component.ts">
    ```ts theme={null}
    import { Component, OnInit } from '@angular/core';
    import {  CometChatThemeService, CometChatUIKit } from '@cometchat/chat-uikit-angular';
    import "@cometchat/uikit-elements";

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit{
      ngOnInit(): void {

      }

      title = 'angular-app';
      constructor(private themeService:CometChatThemeService) {
        themeService.theme.palette.setMode("light")
        themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" })
      }

      onLogin(UID?: any) {
        CometChatUIKit.login({ uid: UID }).then(
          (user) => {
            setTimeout(() => {
              window.location.reload();
            }, 1000);
          },
          (error) => {
            console.log("Login failed with exception:", { error });
          }
        );
      }
    }
    ```
  </Tab>

  <Tab title="app.component.html">
    ```html theme={null}
    <div class="fullwidth">
      <cometchat-conversations-with-messages></cometchat-conversations-with-messages>
    </div>
    ```
  </Tab>
</Tabs>

***

### Actions

[Actions](/ui-kit/angular/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.

While the ConversationsWithMessages component does not have its actions, its components - [Conversation](/ui-kit/angular/components-overview#actions), [Messages](/ui-kit/angular/messages), and [Contacts](/ui-kit/angular/contacts) - each have their own set of actions.

The Action of the components can be overridden through the use of the [Configurations](#configurations) object of its components. Here is an example code snippet.

<Tabs>
  <Tab title="app.component.ts">
    ```ts theme={null}
    import { Component, OnInit } from '@angular/core';
    import {  CometChatThemeService, CometChatUIKit } from '@cometchat/chat-uikit-angular';
    import { ContactsConfiguration, ConversationsConfiguration } from '@cometchat/uikit-shared';
    import "@cometchat/uikit-elements";

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit{

      public handleOnError = (error: CometChat.CometChatException) => {
       //your custom on error actions
      };
      public handleOnClose = () =>{
        //your custom on close actions
      };
      public conversationsConfigurations = new ConversationsConfiguration({
        onError:this.handleOnError,
      });
      public startConversationConfiguration = new ContactsConfiguration({
        onClose: this.handleOnClose
      });

      constructor(private themeService:CometChatThemeService) {
        themeService.theme.palette.setMode("light")
        themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" })
      }

      onLogin(UID?: any) {
        CometChatUIKit.login({ uid: UID }).then(
          (user) => {
            setTimeout(() => {
              window.location.reload();
            }, 1000);
          },
          (error) => {
            console.log("Login failed with exception:", { error });
          }
        );
      }
    }
    ```
  </Tab>

  <Tab title="app.component.html">
    ```html theme={null}
    <div class="fullwidth">
      <cometchat-conversations-with-messages
        [StartConversationConfiguration]="startConversationConfiguration"
        [conversationConfiguration]="conversationsConfigurations"
      >
      </cometchat-conversations-with-messages>
    </div>
    ```
  </Tab>
</Tabs>

***

The ConversationsWithMessages component overrides several actions from its components to reach its default behavior. The list of actions overridden by ConversationsWithMessages includes:

* [OnItemClick](/ui-kit/angular/conversations#1-onitemclick) : By overriding the `OnItemClick` of the Conversation Component, ConversationsWithMessages achieves navigation from [Conversation](/ui-kit/angular/conversations) to [Messages](/ui-kit/angular/messages) component.

  <Frame>
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/-S5qACEOIWfW5CsV/images/7ccda00c-on_item_click_2_web_screens-03c7fa492180016e601adc25df243aea.png?fit=max&auto=format&n=-S5qACEOIWfW5CsV&q=85&s=0ef6a61a69f021e928e4d0621b2c47a2" width="3600" height="2400" data-path="images/7ccda00c-on_item_click_2_web_screens-03c7fa492180016e601adc25df243aea.png" />
  </Frame>

### Fliters

**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.

While the ConversationsWithMessages component does not have filters, its components do, For more detail on individual filters of its component refer to [Conversations Filters](/ui-kit/angular/conversations#filters) and [Messages Filters](/ui-kit/angular/messages).

By utilizing the [Configurations](#configurations) object of its components, you can apply filters.

In the following **example**, we're filtering Conversation to only show `User`

<Tabs>
  <Tab title="app.component.ts">
    ```ts theme={null}
    import { Component, OnInit } from '@angular/core';
    import {  CometChatThemeService, CometChatUIKit } from '@cometchat/chat-uikit-angular';
    import { ConversationsConfiguration } from '@cometchat/uikit-shared';
    import "@cometchat/uikit-elements";

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit{

      public conversationsConfigurations = new ConversationsConfiguration({
        conversationsRequestBuilder: new CometChat.ConversationsRequestBuilder().setConversationType('user').setLimit(10),
      });

      constructor(private themeService:CometChatThemeService) {
        themeService.theme.palette.setMode("light")
        themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" })
      }

      onLogin(UID?: any) {
        CometChatUIKit.login({ uid: UID }).then(
          (user) => {
            setTimeout(() => {
              window.location.reload();
            }, 1000);
          },
          (error) => {
            console.log("Login failed with exception:", { error });
          }
        );
      }
    }
    ```
  </Tab>

  <Tab title="app.component.html">
    ```html theme={null}
    <div class="fullwidth">
      <cometchat-conversations-with-messages
        [conversationConfiguration]="conversationsConfigurations"
      >
      </cometchat-conversations-with-messages>
    </div>
    ```
  </Tab>
</Tabs>

***

### Events

[Events](/ui-kit/angular/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 ConversationsWithMessages does not generate its events but its component does. For a full list of these events, you can refer to [Conversations events](/ui-kit/angular/conversations#events) and [Messages events](/ui-kit/angular/messages#events).

In the following example, we're incorporating observers for the `ConversationDeleted` event of `Conversations` and the `MessageSent` event of the `Messages` component.

<Tabs>
  <Tab title="Add Listener">
    ```js theme={null}

    public ccConversationDeleted!: Subscription;
    public ccMessageSent!: Subscription;

    ngOnInit(): void {
    this.ccConversationDeleted =
    CometChatConversationEvents.ccConversationDeleted.subscribe((conversation: CometChat.Conversation) => {
    //your code
    })

    this.ccMessageSent =
    CometChatMessageEvents.ccMessageSent.subscribe((obj: IMessages) => {
    //your code
    })
    }
    ```
  </Tab>
</Tabs>

***

<Tabs>
  <Tab title="Remove Listener">
    ```js theme={null}

    ngOnDestroy(): void {
    this.ccConversationDeleted?.unsubscribe();
    this.ccMessageSent?.unsubscribe();
    }
    ```
  </Tab>
</Tabs>

***

## Customization

To fit your app's design requirements, you have the ability to customize the appearance of the ConversationsWithMessages 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. ConversationsWithMessages component doesn't have its own style parameters. But you can customize its component styles. For more details on individual component styles, you can refer [Conversation Styles](/ui-kit/angular/conversations#style), [Messages Styles](/ui-kit/angular/messages#1-messages-style), and [Contacts Styles](/ui-kit/angular/contacts#contactsstyle)

Styles can be applied to SubComponents using their respective [configurations](#configurations).

**Example**

<Tabs>
  <Tab title="app.component.ts">
    ```ts theme={null}
    import { Component, OnInit } from '@angular/core';
    import {  CometChatThemeService, CometChatUIKit } from '@cometchat/chat-uikit-angular';
    import { ConversationsStyle, ConversationsConfiguration } from '@cometchat/uikit-shared';
    import "@cometchat/uikit-elements";

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit{

      public conversationsStyle:ConversationsStyle = new ConversationsStyle({
        width:'100%',
        height:'100%',
        border:'1px solid #ee7752',
        background:'linear-gradient(#ee7752, #e73c7e, #23a6d5, #23d5ab)'
      });

      public conversationsConfigurations = new ConversationsConfiguration({
        conversationsStyle:this.conversationsStyle,
      });

      constructor(private themeService:CometChatThemeService) {
        themeService.theme.palette.setMode("light")
        themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" })
      }

      onLogin(UID?: any) {
        CometChatUIKit.login({ uid: UID }).then(
          (user) => {
            setTimeout(() => {
              window.location.reload();
            }, 1000);
          },
          (error) => {
            console.log("Login failed with exception:", { error });
          }
        );
      }
    }
    ```
  </Tab>

  <Tab title="app.component.html">
    ```html theme={null}
    <div class="fullwidth">
      <cometchat-conversations-with-messages
        [conversationConfiguration]="conversationsConfigurations"
      >
      </cometchat-conversations-with-messages>
    </div>
    ```
  </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.

##### user

you can utilize the `user` method with a [User](/sdk/javascript/user-management) object as input to the ConversationsWithMessages component. This will automatically direct you to the [Messages](/ui-kit/angular/messages) component for the specified `User`.

<Tabs>
  <Tab title="app.component.ts">
    ```ts theme={null}
    import { Component, OnInit } from '@angular/core';
    import {  CometChatThemeService, CometChatUIKit } from '@cometchat/chat-uikit-angular';
    import "@cometchat/uikit-elements";

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit{

      public userObject!: CometChat.User;

      ngOnInit(): void {
        CometChat.getUser("uid").then((user:CometChat.User)=>{
          this.userObject=user;
        });
      };

      constructor(private themeService:CometChatThemeService) {
        themeService.theme.palette.setMode("light")
        themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" })
      }

      onLogin(UID?: any) {
        CometChatUIKit.login({ uid: UID }).then(
          (user) => {
            setTimeout(() => {
              window.location.reload();
            }, 1000);
          },
          (error) => {
            console.log("Login failed with exception:", { error });
          }
        );
      }
    }
    ```
  </Tab>

  <Tab title="app.component.html">
    ```html theme={null}
    <div class="fullwidth">
      <cometchat-conversations-with-messages *ngIf="userObject" [user]="userObject">
      </cometchat-conversations-with-messages>
    </div>
    ```
  </Tab>
</Tabs>

***

##### group

you can utilize the `group` method with a [Group](/sdk/javascript/groups-overview) object as input to the ConversationsWithMessages component. This will automatically direct you to the [Messages](/ui-kit/angular/messages) component for the specified `Group`.

<Tabs>
  <Tab title="app.component.ts">
    ```ts theme={null}
    import { Component, OnInit } from '@angular/core';
    import {  CometChatThemeService, CometChatUIKit } from '@cometchat/chat-uikit-angular';
    import "@cometchat/uikit-elements";

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit{

      public groupObject!: CometChat.Group;

      ngOnInit(): void {
        CometChat.getGroup("guid").then((group:CometChat.Group)=>{
          this.groupObject=group;
        });
      };

      constructor(private themeService:CometChatThemeService) {
        themeService.theme.palette.setMode("light")
        themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" })
      }

      onLogin(UID?: any) {
        CometChatUIKit.login({ uid: UID }).then(
          (user) => {
            setTimeout(() => {
              window.location.reload();
            }, 1000);
          },
          (error) => {
            console.log("Login failed with exception:", { error });
          }
        );
      }
    }
    ```
  </Tab>

  <Tab title="app.component.html">
    ```html theme={null}
    <div class="fullwidth">
      <cometchat-conversations-with-messages
        *ngIf="userObject"
        [group]="groupObject"
      >
      </cometchat-conversations-with-messages>
    </div>
    ```
  </Tab>
</Tabs>

***

##### Components

Nearly all functionality customizations available for a Component are also available for the composite component. Using [Configuration](#configurations), you can modify the properties of its components to suit your needs.

You can find the list of all Functionality customization of individual components in [Conversations](/ui-kit/angular/conversations#functionality) , [Messages](/ui-kit/angular/messages#functionality), and [Contacts](/ui-kit/angular/contacts)

**Example**

<Tabs>
  <Tab title="app.component.ts">
    ```ts theme={null}
    import { Component, OnInit } from '@angular/core';
    import {  CometChatThemeService, CometChatUIKit } from '@cometchat/chat-uikit-angular';
    import { MessagesConfiguration, ConversationsConfiguration } from '@cometchat/uikit-shared';
    import { TitleAlignment } from '@cometchat/uikit-resources';
    import "@cometchat/uikit-elements";

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit{

      public messagesConfiguration = new MessagesConfiguration({
        disableTyping:true,
        hideMessageHeader:true
      });
      public conversationsConfigurations = new ConversationsConfiguration({
        titleAlignment: TitleAlignment.center,
        hideError:true
      });

      constructor(private themeService:CometChatThemeService) {
        themeService.theme.palette.setMode("light")
        themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" })
      }

      onLogin(UID?: any) {
        CometChatUIKit.login({ uid: UID }).then(
          (user) => {
            setTimeout(() => {
              window.location.reload();
            }, 1000);
          },
          (error) => {
            console.log("Login failed with exception:", { error });
          }
        );
      }
    }
    ```
  </Tab>

  <Tab title="app.component.html">
    ```html theme={null}
    <div class="fullwidth">
      <cometchat-conversations-with-messages
        [messagesConfiguration]="messagesConfiguration"
        [conversationConfiguration]="conversationsConfigurations"
      >
      </cometchat-conversations-with-messages>
    </div>
    ```
  </Tab>
</Tabs>

***

### 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 own views, layouts, and UI elements and then incorporate those into the component.

By utilizing the [Configuration](#configurations) object of each component, you can apply advanced-level customizations to the ConversationsWithMessages.

**Example**

<Tabs>
  <Tab title="app.component.ts">
    ```ts theme={null}
    import { Component, OnInit, ViewChild, TemplateRef } from '@angular/core';
    import {  CometChatThemeService, CometChatUIKit } from '@cometchat/chat-uikit-angular';
    import { ConversationsConfiguration } from '@cometchat/uikit-shared';
    import "@cometchat/uikit-elements";

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit{

      @ViewChild('subtitleTemplate', { static: true }) subtitleTemplate!: TemplateRef<any>;
      public conversationsConfigurations!: ConversationsConfiguration;

      ngOnInit() {
        this.conversationsConfigurations = new ConversationsConfiguration({
          subtitleView:this.subtitleTemplate
        });
      };

      constructor(private themeService:CometChatThemeService) {
        themeService.theme.palette.setMode("light")
        themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" })
      }

      onLogin(UID?: any) {
        CometChatUIKit.login({ uid: UID }).then(
          (user) => {
            setTimeout(() => {
              window.location.reload();
            }, 1000);
          },
          (error) => {
            console.log("Login failed with exception:", { error });
          }
        );
      }
    }
    ```
  </Tab>

  <Tab title="app.component.html">
    ```html theme={null}
    <div class="fullwidth">
      <cometchat-conversations-with-messages
        [conversationConfiguration]="conversationsConfigurations"
      >
      </cometchat-conversations-with-messages>
    </div>

    <ng-template #subtitleTemplate>
      <div
        style="display: flex; align-items: left; padding: 10px; font-size: 10px;"
      >
        Your Custom Subtitle View
      </div>
    </ng-template>
    ```
  </Tab>
</Tabs>

***

To find all the details on individual Component advance customization you can refer, [Conversations Advance](/ui-kit/angular/conversations#advanced),[Messages Advance](/ui-kit/angular/messages#advanced) and [Contacts Advance](/ui-kit/angular/contacts)

ConversationsWithMessages uses advanced-level customization of both Conversation & Messages components to achieve its default behavior.

1. ConversationsWithMessages utilizes the [menu](/ui-kit/angular/conversations#menus) of the `Conversations` subcomponent to navigate the user from [Conversations](/ui-kit/angular/conversations) to [Contacts](/ui-kit/angular/contacts)

   <Frame>
     <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/tnx7dFNyijg-6-_e/images/5000533a-conversations_menu_web_screens-edee991db7eacc5b53cf810f8a6f92be.png?fit=max&auto=format&n=tnx7dFNyijg-6-_e&q=85&s=401e334bf0e286c0988a22e721708731" width="3600" height="2400" data-path="images/5000533a-conversations_menu_web_screens-edee991db7eacc5b53cf810f8a6f92be.png" />
   </Frame>

2. ConversationsWithMessages utilizes the [menu](/ui-kit/angular/messages#auxiliarymenu) of the `Messages` subcomponent to navigate from [Messages](/ui-kit/angular/messages) to [Details](/ui-kit/angular/group-details)

   <Frame>
     <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/kibZL8uJM6A1yelM/images/253b9e0c-messages_menu_web_screens-545c6c38b9ef58d02d4c0a29c20aae13.png?fit=max&auto=format&n=kibZL8uJM6A1yelM&q=85&s=94ecbce17b187c68c2c20f78dc8e94fe" width="3600" height="2400" data-path="images/253b9e0c-messages_menu_web_screens-545c6c38b9ef58d02d4c0a29c20aae13.png" />
   </Frame>

<Warning>
  When you override `menu`, the default behavior of ConversationsWithMessages will also be overridden.
</Warning>

## Configurations

[Configurations](/ui-kit/angular/components-overview#configurations) offer the ability to customize the properties of each component within a Composite Component.

ConversationsWithMessages has `Conversations`, `Messages`, and `Contacts` component. Hence, each of these components will have its individual \`Configuration\`\`.

* `Configurations` expose properties that are available in its individual components.

#### Conversations

You can customize the properties of the Conversations component by making use of the conversationsConfiguration. You can accomplish this by employing the `conversationsConfiguration` props as demonstrated below:

<Tabs>
  <Tab title="TypeScript">
    ```ts theme={null}
     public conversationsConfigurations = new ConversationsConfiguration({
    //override properties of conversations
     });
    ```
  </Tab>
</Tabs>

All exposed properties of `ConversationsConfiguration` can be found under [Conversations](/ui-kit/angular/conversations#customization). Properties marked with the 🛑 symbol are not accessible within the Configuration Object.

**Example**

Let's say you want to change the style of the Conversations subcomponent and, in addition, you only want to display users in the conversation list.

You can modify the style using the `conversationsStyle` property and filter the list with the `conversationsRequestBuilder` property.

<Frame>
  <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/cD2BDn03AOl0XRHO/images/073ea700-conversations_configuration_web_screens-e8acc93063b2b18382bbac78379d6214.png?fit=max&auto=format&n=cD2BDn03AOl0XRHO&q=85&s=90c89a6a07d887b001f51e2635eda749" width="3600" height="2400" data-path="images/073ea700-conversations_configuration_web_screens-e8acc93063b2b18382bbac78379d6214.png" />
</Frame>

<Tabs>
  <Tab title="app.component.ts">
    ```ts theme={null}
    import { Component, OnInit } from '@angular/core';
    import {  CometChatThemeService, CometChatUIKit } from '@cometchat/chat-uikit-angular';
    import {ConversationsStyle, ConversationsConfiguration } from '@cometchat/uikit-shared';
    import "@cometchat/uikit-elements";

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit{

      public conversationsConfigurations = new ConversationsConfiguration({
        conversationsStyle: new ConversationsStyle({
          width: "100%",
          height: "100%",
          border: "1px solid #ee7752",
          background: "linear-gradient(#ee7752, #e73c7e, #23a6d5, #23d5ab)",
        }),
        conversationsRequestBuilder: new CometChat.ConversationsRequestBuilder().setConversationType('user').setLimit(5),
      });

      constructor(private themeService:CometChatThemeService) {
        themeService.theme.palette.setMode("light")
        themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" })
      }

      onLogin(UID?: any) {
        CometChatUIKit.login({ uid: UID }).then(
          (user) => {
            setTimeout(() => {
              window.location.reload();
            }, 1000);
          },
          (error) => {
            console.log("Login failed with exception:", { error });
          }
        );
      }
    }
    ```
  </Tab>

  <Tab title="app.component.html">
    ```html theme={null}
    <div class="fullwidth">
      <cometchat-conversations-with-messages
        [conversationConfiguration]="conversationsConfigurations"
      >
      </cometchat-conversations-with-messages>
    </div>
    ```
  </Tab>
</Tabs>

***

#### Messages

You can customize the properties of the Messages component by making use of the messagesConfiguration. You can accomplish this by employing the `messagesConfiguration` props as demonstrated below:

<Tabs>
  <Tab title="TypeScript">
    ```ts theme={null}
     public messagesConfiguration = new MessagesConfiguration({
    //override properties of messages
     });
    ```
  </Tab>
</Tabs>

All exposed properties of `MessagesConfiguration` can be found under [Messages](/ui-kit/angular/messages#configuration). Properties marked with the 🛑 symbol are not accessible within the Configuration Object.

**Example**

Let's say you want to change the style of the Messages subcomponent and, in addition, you only want to hide message header.

You can modify the style using the `messagesStyle` property and hide the message header with the `hideMessageHeader` property.

<Frame>
  <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/nrKmc8-pXdAch9Hn/images/6c0b42de-messages_configuration_web_screens-5380743bbbfec54d08b45104459eab1a.png?fit=max&auto=format&n=nrKmc8-pXdAch9Hn&q=85&s=d2d3c044b28265d33889da9c5b9b374a" width="3600" height="2400" data-path="images/6c0b42de-messages_configuration_web_screens-5380743bbbfec54d08b45104459eab1a.png" />
</Frame>

<Tabs>
  <Tab title="app.component.ts">
    ```ts theme={null}
    import { Component, OnInit } from '@angular/core';
    import {  CometChatThemeService, CometChatUIKit } from '@cometchat/chat-uikit-angular';
    import { MessagesConfiguration, MessagesStyle } from '@cometchat/uikit-shared';
    import "@cometchat/uikit-elements";

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit{

      public messagesConfiguration = new MessagesConfiguration({
        hideMessageHeader:true,
        messagesStyle: new MessagesStyle({
          width: "100%",
          height: "100%",
          border: "1px solid #ee7752",
          background: "linear-gradient(#ee7752, #e73c7e, #23a6d5, #23d5ab)",
          messageTextColor: "yellow",
        }),
      });

      constructor(private themeService:CometChatThemeService) {
        themeService.theme.palette.setMode("light")
        themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" })
      }

      onLogin(UID?: any) {
        CometChatUIKit.login({ uid: UID }).then(
          (user) => {
            setTimeout(() => {
              window.location.reload();
            }, 1000);
          },
          (error) => {
            console.log("Login failed with exception:", { error });
          }
        );
      }
    }
    ```
  </Tab>

  <Tab title="app.component.html">
    ```html theme={null}
    <div class="fullwidth">
      <cometchat-conversations-with-messages
        [messagesConfiguration]="messagesConfiguration"
      >
      </cometchat-conversations-with-messages>
    </div>
    ```
  </Tab>
</Tabs>

***

#### Contacts

You can customize the properties of the Contacts component by making use of the ContactsConfiguration. You can accomplish this by employing the `StartConversationConfiguration` property as demonstrated below:

<Tabs>
  <Tab title="TypeScript">
    ```ts theme={null}
    public startConversationConfiguration = new ContactsConfiguration({
    //override properties of contacts
     });
    ```
  </Tab>
</Tabs>

All exposed properties of `ContactsConfiguration` can be found under [Contacts](/ui-kit/angular/contacts). Properties marked with the 🛑 symbol are not accessible within the Configuration Object.

**Example**

Let's say you want to change the style of the Contacts subcomponent and, in addition, you only want to hide the submit button.

You can modify the style using the `contactsStyle` property and hide the submit button with the `hideSubmitButton` property.

<Frame>
  <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/txxqsAdX4Imi9Slw/images/653af134-contacts_configuration_web_screens-071a3f4508a05ac373179c951d7c33ad.png?fit=max&auto=format&n=txxqsAdX4Imi9Slw&q=85&s=f52d46a54a0baa5f984d0cfb44960a0b" width="3600" height="2400" data-path="images/653af134-contacts_configuration_web_screens-071a3f4508a05ac373179c951d7c33ad.png" />
</Frame>

<Tabs>
  <Tab title="app.component.ts">
    ```ts theme={null}
    import { Component, OnInit } from '@angular/core';
    import {  CometChatThemeService, CometChatUIKit } from '@cometchat/chat-uikit-angular';
    import { ContactsConfiguration, ContactsStyle } from '@cometchat/uikit-shared';
    import "@cometchat/uikit-elements";

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit{

       public handleOnClose = () =>{
        console.log("Your custom on close actions");
       };

       public startConversationConfiguration = new ContactsConfiguration({
        onClose: this.handleOnClose,
        contactsStyle: new ContactsStyle({
          background:'linear-gradient(#ee7752, #e73c7e, #23a6d5, #23d5ab)',
          width: "100%",
          height: "100%",
          border: "1px solid #ee7752",
          titleTextColor: "#7E57C2",
          activeTabBackground: "#B39DDB",
        })
      });

      constructor(private themeService:CometChatThemeService) {
        themeService.theme.palette.setMode("light")
        themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" })
      }

      onLogin(UID?: any) {
        CometChatUIKit.login({ uid: UID }).then(
          (user) => {
            setTimeout(() => {
              window.location.reload();
            }, 1000);
          },
          (error) => {
            console.log("Login failed with exception:", { error });
          }
        );
      }
    }
    ```
  </Tab>

  <Tab title="app.component.html">
    ```html theme={null}
    <div class="fullwidth">
      <cometchat-conversations-with-messages
        [StartConversationConfiguration]="startConversationConfiguration"
      >
      </cometchat-conversations-with-messages>
    </div>
    ```
  </Tab>
</Tabs>

***
