Early accessFull site coming soon. Pro is $49.99 a year. See pricing ›

Nexus UI

Scratch Reveal, animated React component

A reward scratch card: rub the silver foil and it wears through where you scratch, shedding dust that falls out of the card. Once enough is gone the rest lifts away with a burst of confetti and the code can be copied to the clipboard.

  • Pro
  • Cards

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

You won20% off Pro
Scratch the foil · 0%

Props

PropTypeDefaultWhat it does
code"MOTION20"The code under the foil; the Copy button writes it to the clipboard.
headline"20% off Pro"Prize line above the code.
eyebrow"You won"Small uppercase line above the headline.
accent"#bf5af2"Colour of the eyebrow.
threshold0.55Share of the foil (0 to 1) that must be scratched before the rest lifts away.
onReveal—Called each time the foil comes off.
onCopy—Called with the code after it has been copied.
className—Extra classes for the outer wrapper.
autoplayfalseScratches the card, reveals it and starts over until someone touches it.