ChannelPreviewTitle
Renders a channel title inside ChannelList. This is the default component for the PreviewTitle prop.
Best Practices
- Provide a fallback title when
displayNameis empty. - Keep titles short to prevent truncation in small layouts.
- Use consistent casing and formatting across channel rows.
- Avoid heavy logic in render; precompute display names when possible.
- Keep title styling aligned with the rest of the preview row.
Props
displayName
Formatted channel name.
| Type |
|---|
| String |
channel
Channel instance from the Stream Chat client.
| Type |
|---|
| Channel |