# XWUIChannelList

A messaging sidebar that lists chat `channels`, each rendered as a row with an avatar/icon, name, last-message preview (`showLastMessage`), timestamp, unread-count badge (`showUnreadCount`), and an online-status dot (`showOnlineStatus`). A built-in search box (`showSearch`) filters channels by name or last-message text, and `groupBy` can bucket rows into `favorites`, `unread`, or `status` sections; selection is tracked via `selectedChannelId` and exposed through `onChannelSelect()`, with `addChannel()` / `removeChannel()` / `updateChannel()` / `setChannels()` for live roster edits.

## Basic Usage

Instantiates a channel list seeded with five workspace channels - unread badges, last-message previews, timestamps, and online dots - with one channel pre-selected and search, unread counts, last-message previews, and online status left at their default-enabled state.

```example
file: examples/BasicUsage.ts
title: Basic Usage
description: Channel list seeded with five workspace channels, unread badges, online dots, and a selected channel.
```

## Grouped by Unread

The roster split into "Unread" and "Read" sections via groupBy.

```example
file: examples/GroupedUnread.ts
title: Grouped by Unread
description: Channel list using groupBy "unread" to bucket rows into Unread and Read sections.
```

## Direct Messages

A people-based DM list with search hidden, online dots, and status grouping.

```example
file: examples/DirectMessages.ts
title: Direct Messages
description: Search-less direct-message roster with online status and Active / Muted grouping.
```

```api
```
