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
Prop | Type | Default | Description |
---|---|---|---|
className | string | The class name to apply to the component. | |
width | number | Width of the scratch container. | |
height | number | Height of the scratch container. | |
minScratchPercentage | number | 50 | Minimum percentage of scratched area to be considered as completed (Value between 0 and 100). |
children | node | The content to display in the marquee. | |
onCompete | function | Callback function called when scratch is completed |