Component packs › Parcel › Swipe Cart

Swipe Cart

Swipe a row past the line and it flies off; the rest close the gap on springs, an undo pill drops in and every total rolls.

Swipe Cart is a mini cart from Parcel, a component pack with 8 components: E-commerce components where every product turns, packs and travels. Price: $2 for the whole pack.

Built with: 1:1 swipe, undo, rolling prices.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Swipe Cart props

PropTypeDefaultDescription
itemsSwipeCartItem[]
currencystring
deliverynumberDelivery cost (0 = free).
onChange(items: SwipeCartItem[]) => void
onCheckout(items: SwipeCartItem[]) => void
theme'dark' | 'light'
autoplaybooleanShowcase mode: swipes a row away, undoes it and changes quantities until touched.

Methods on the ref

Use it in React

import SwipeCart from './SwipeCart';

<SwipeCart />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Parcel

Good for: E-commerce UI components.