ORBIT.

Components

Scratch Card

A canvas-based scratch card that reveals hidden content as you draw over the silver surface. Once enough is scratched away, the cover fades out automatically.

Preview

🎉

You won!

$100 Gift Card

Installation

npx shadcn@latest add https://orbit.ruturaj.xyz/r/scratch-card

Props

PropTypeDefaultDescription
childrenReactNodeContent revealed by scratching
brushSizenumber40Radius of the scratch brush in pixels
thresholdnumber60% of surface cleared to trigger auto-reveal
onComplete() => voidCalled when the threshold is reached
classNamestringSize, rounding, and shadow of the card

Component