Custom CSS helps you to customize the call screen of CometChat which comes with default settings.
- You might want to reposition the calling containers and
- Change the names of participants in the call with different fonts and sizes.
- Change the background color of the call screen or
- Change the height and width of the participants’ call screen
You now have access to the custom CSS classes which help you change accordingly to suit your need. Please go through the examples below.
Example
Let’s add all the classes that we need to pass inside the calling component in a variable CSS.
You need to pass the CSS string in CallSettings in setCustomCSS.
| Property | Description | Type | Value |
|---|
| setCustomCSS | Option to update the custom css for call screen | String | CSS |
Common CSS Classes
There are a few common classes used for different modes in the call screen
- custom-main-container
This is the most outer component of the calling component.
- custom—tile-main-call-container
This the Container of the main video and till list or a local stream component.
- custom-name
This class is passed in user name text in all components.
Tile mode
- custom-tile-main-video-container This is the main video container. It is the div that has the main speaker video, for tile mode.
- custom-tile-list-container This is the div that contains a list of tiles.
- custom-tile-container The div is used for tile video.
SpotLight Mode
- custom-spotlight-main-video-container This is the main video container it the div which has the main speaker video, for spotlight mode.
- custom-local-spotlight-stream-container This div contains the local video of a user in spotlight mode.
- custom-button-bar This is the container of all the buttons in calling.
- custom-button This is the div of every button in the button bar.
Grid Mode
- custom-grid-container This is the container of the grid video.
It is recommended to not pass CSS of other classes which are not listed here as it may cause some UI issues. Also resizing of the grid container is not allowed as it may affect the layout of grid mode.