Component packs › Parcel › 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.
| Prop | Type | Default | Description |
|---|---|---|---|
items | SwipeCartItem[] | ||
currency | string | ||
delivery | number | Delivery cost (0 = free). | |
onChange | (items: SwipeCartItem[]) => void | ||
onCheckout | (items: SwipeCartItem[]) => void | ||
theme | 'dark' | 'light' | ||
autoplay | boolean | Showcase mode: swipes a row away, undoes it and changes quantities until touched. |
readonly items: SwipeCartItem[]destroy(): voidimport SwipeCart from './SwipeCart';
<SwipeCart />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: E-commerce UI components.