Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Swipe List

ProNew

List 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

PropTypeDefault
children*React.ReactNode

The 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.