会话列表

New

侧栏会话列表:带操作槽的分组标题、30px 行(未读圆点、时间与悬停操作钮互换),以及用共享布局在行间平滑滑动的选中底块。

Pinned
Recent

安装

用 shadcn CLI 添加,或手动复制源码。

$ bunx --bun shadcn add @uilab/thread-list

API 参考

ThreadList

className?
string

ThreadListSection

title?
ReactNode

Muted section label, e.g. "Pinned" or "Recent".

action?
ReactNode

Trailing slot beside the title, e.g. a "new" `ThreadListAction`.

className?
string

ThreadListItem

active?
boolean

Highlights the row and pins the moving indicator here.

false
unread?
boolean

Renders a small blue dot after the title.

false
icon?
ReactNode

16px leading icon, e.g. `<MessageSquare className="h-4 w-4" />`.

meta?
ReactNode

Trailing meta, e.g. a relative timestamp. Hidden on row hover in favor of `actions` when both are passed; stays visible when `actions` is omitted.

actions?
ReactNode

Row of `ThreadListAction`s revealed on hover, replacing `meta`.

onSelect?
(() => void)
className?
string
children?
ReactNode

The row's title — truncates to a single line.

ThreadListAction

aria-label
string
onClick?
(() => void)
className?
string

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.