Component packs › Parcel › Scratch Promo
Scratch the foil off with flakes flying; past half it peels away, and applying the code drops the discount into a total that rolls down.
Scratch Promo is a promo code 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: scratch canvas, reveal button, discount drop.
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 |
|---|---|---|---|
code | string | The code under the foil. | |
off | number | Discount as a fraction (0.2 = 20 %). | |
subtotal | number | Order subtotal. | |
currency | string | ||
onApply | (code: string, total: number) => void | ||
theme | 'dark' | 'light' | ||
autoplay | boolean | Showcase mode: scratches, applies and resets until touched. |
readonly applied: booleanreveal(): voiddestroy(): voidimport ScratchPromo from './ScratchPromo';
<ScratchPromo />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: E-commerce UI components.