Back to components
ComponentWidgetFree

Dice Roll Discount Popup React component

A gamified discount-capture widget where visitors roll two 3D dice for a reward tier, with a themed reveal modal and code copy, rendered inline or as a corner-launched popup with manual/delay/scroll triggers.

About the Dice Roll Discount Popup component

Dice Roll Discount Popup lets visitors roll two 3D dice for a reward. The dice tumble for a moment, land, and the total decides the prize: a higher total gives a better reward, and any double gives a special top prize. A modal shows the prize with its code and a copy button, and every prize won stays listed below.

theme loads one of five ready sets of prizes (ecommerce, campaign, restaurant, saas, event), each with five tiers by total and a reward for doubles. Each visitor gets freeRolls rolls (3 by default), and the rolls left and the prizes won are saved in localStorage. lightMode switches to a light card. It can sit inline or as a popup that opens from a button, either on click, after a delay or once on scroll.

When to use it

Use it for first-order discounts, newsletter sign-up rewards, sale campaigns, café promotions and event upsells, where a quick game makes the offer feel earned.

For a wheel where some spins can win nothing, use Spin to Win Wheel. For a scratch-off reveal, use Scratch Card Popup.

Installation

Add the Dice Roll Discount Popup component to your project with the shadcn CLI. It lands in components/dice-roll-discount-popup.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/dice-roll-discount-popup

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install clsx tailwind-merge

Related components

Contextual Hints Panel
Free
Orbit Globe
Payment Calendar
Free
Curved Image Carousel
Hover Compare
Scroll Zoom Media Reveal