Channel list items
Use ChannelsItemConfig to style the built-in channel list rows. Read the current config with cloneChannelsItemConfig, edit it, then write it back with setChannelsItemConfig.
tip
Set the channel list item config before app.ready().
Main options
| Field | Description |
|---|---|
radius | Row corner radius in pixels. |
portraitSize | Avatar size: 'large' or 'small'. |
topBackgroundColor | Background color for pinned rows as a hex number. |
hoverBackgroundColor | Hover background color as a hex number. |
activeBackgroundColor | Background color for the selected row as a hex number. |
Default values
| Field | Default |
|---|---|
radius | 20 |
portraitSize | 'large' |
topBackgroundColor | 0xEFF4FF |
hoverBackgroundColor | 0xF3F5FA |
activeBackgroundColor | 0xD2E1FE |
Read and write
TypeScript
import type { ChannelsItemConfig } from '@nexconn/chatui';
const config: ChannelsItemConfig = app.cloneChannelsItemConfig();
config.radius = 16;
config.portraitSize = 'small';
config.activeBackgroundColor = 0xE8F0FF;
app.setChannelsItemConfig(config);