Scratch Card
ProInstallation
ProRequires a Planes Pro license.
npx shadcn add @useplanes/scratch-card
Works once the @useplanes registry is set up in your project (one-time). After that, copy and run commands directly.
Unlock with Planes Pro
$99 once · 99 Pro components · lifetime updates.
<ScratchCard label="Prize" foil="silver">
<Prize />
</ScratchCard>Examples
Reveal all, then reset
One button drives every card; set revealed back to false and the foil grows back.
const [show, setShow] = useState(false);
<ScratchCard revealed={show} onRevealChange={setShow} foil="gold" label="Bonus">
<Bonus />
</ScratchCard>Use cases
Promo codes and rewards
Loyalty and referral screens where the prize is earned with a swipe instead of just shown.
Collectible reveals
Card packs, drops and gacha moments: the foil comes off and the pull is underneath.
Onboarding surprises
A hidden tip, easter egg or welcome credit that asks for one playful gesture.
Sensitive values
Gift-card PINs and one-time codes that stay covered until someone deliberately scratches.