Back to components
ComponentAlertFree

Scratch Card Popup React component

A gamified scratch-to-win popup, drag to scratch a gold-foil canvas off a 3x3 icon grid, match three to win a reward tier with a confetti burst, copy the code, and track attempts left. Inline or corner-widget popup with manual, delay or scroll triggers.

About the Scratch Card Popup component

Scratch Card Popup is a free scratch-to-win card. Visitors drag to wipe gold foil off a 3x3 grid of icons, and once about 42% is cleared, or they press 'Reveal instantly', the card shows three matching crowns, a confetti burst and a prize with a code to copy. It works inline or as a floating corner widget that opens it in a modal.

theme picks ecommerce, campaign, restaurant, saas or event, and each theme's title, colors and three prizes with codes live in the THEMES object in the source. freeAttempts (default 3) sets how many cards a visitor gets, and asPopup, trigger (manual, delay or scroll), delaySeconds and widgetPosition control the widget. Scratching works with mouse and touch. The scratch progress is a progressbar, the prize is announced in a polite status region and the modal closes with Escape.

When to use it

Use it for welcome offers, restaurant or cafe promotions, early-bird event perks and seasonal campaigns, where a quick game makes the offer memorable.

For a dice mechanic, use Dice Discount Popup. For a simple offer card, use Sales Ticket Popup.

Installation

Add the Scratch Card Popup component to your project with the shadcn CLI. It lands in components/scratch-card-popup.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/scratch-card-popup

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

Related components

Exit-intent Popup
Free
Dice Discount Popup
Free
Newsletter Popup
Free
Sales Ticket Popup
Free
Stacked Alerts Tray
Free
SEO-ready
Blog Article Cards