可滑动列表

移动端风格的列表行,左右滑动可露出上下文操作按钮。

Priority queue

Ready

Launch brief
Finalize the announcement copy
9:41
Client feedback
Three comments need a response
11:08
Design review
Check spacing before handoff
13:20
Flagged run
Retry queue has one failed job
Now
4 openToday

安装

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

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

API 参考

items
SwipeableListItem[]
value?
SwipeableListValue | null
defaultValue?
SwipeableListValue | null
null
onValueChange?
((value: SwipeableListValue | null) => void)
onAction?
((payload: { item: SwipeableListItem; action: SwipeAction; side: SwipeSide; }) => void)
actionWidth?
number
56
revealThreshold?
number
34
closeOnAction?
boolean
true
className?
string
classNames?
SwipeableListClassNames
renderItem?
((item: SwipeableListItem) => ReactNode)

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.