Renders an interactive list of channels.
It can represent all channels of the application, only channels joined by the current user, all channels available to be joined, or whatever else is passed into it. A common pattern in chat applications is to render two instances of the component - one visible all the time to show joined channels, and another one hidden inside a modal with channels available to join. Make sure to handle the onChannelSwitched event to switch the current channel passed to the Chat provider.
This section shows the preview of a sample Channel List component and its source code.
- Source Code
Company culture space
Async virtual standup
Ask the CEO anything
भारत के कार्यालय में आपका स्वागत है🇮🇳!
This channel is for company wide chatter
London Office 🇬🇧
Everything about movies
Non-work banter and water cooler conversation
Zapytaj Nas O Cokolwiek 🇵🇱
show all 106 lines
"description": "Everything about movies",
"name": "Daily Standup",
You can configure the component using these parameters:
|ChannelEntity | string||n/a||Option to pass a list of channels, including metadata, to render on the list.|
|(a: ChannelEntity, b: ChannelEntity) => -1 | 0 | 1||n/a||Channels are sorted alphabetically by default, you can override that by providing a sorter function.|
|(channel: ChannelEntity) => JSX.Element||n/a||Option to provide an extra actions renderer to add custom action buttons to each channel.|
|(channel: ChannelEntity) => JSX.Element||n/a||Option to provide a custom channel renderer to override default themes and CSS variables.|
|(channel: ChannelEntity) => unknown||n/a||Callback run when a user clicked one of the channels. Can be used to switch the current channel.|