Swipe List
ProNewList rows with actions underneath that a sideways swipe uncovers. The row follows the finger, resists past the last action and settles open or closed.
Installation
pnpm dlx shadcn@latest add @viewport/swipe-list
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| children* | React.ReactNodeThe row's content. | — |
| actions* | SwipeAction[]The actions under the row, at its trailing edge, nearest the edge last. | — |
Accessibility
- Actions are real buttons; focusing one opens the row to show it.
- Nothing depends on being able to swipe.
- Vertical scrolling stays with the page.
- The settle is instant under reduced motion.