❤️ Support our project - Your donation helps us continue developing awesome tools!


Docs
Scratch To Reveal

Scratch To Reveal

The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath.

😎

Installation

npx nyxbui@latest add scratch-to-reveal

Props

PropTypeDefaultDescription
classNamestringThe class name to apply to the component.
widthnumberWidth of the scratch container.
heightnumberHeight of the scratch container.
minScratchPercentagenumber50Minimum percentage of scratched area to be considered as completed (Value between 0 and 100).
childrennodeThe content to display in the marquee.
onCompetefunctionCallback function called when scratch is completed