Skip to main content

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

FieldDescription
radiusRow corner radius in pixels.
portraitSizeAvatar size: 'large' or 'small'.
topBackgroundColorBackground color for pinned rows as a hex number.
hoverBackgroundColorHover background color as a hex number.
activeBackgroundColorBackground color for the selected row as a hex number.

Default values

FieldDefault
radius20
portraitSize'large'
topBackgroundColor0xEFF4FF
hoverBackgroundColor0xF3F5FA
activeBackgroundColor0xD2E1FE

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);