@clreddy21/react-scratchcard-with-custom-imagesize
v1.0.1
Published
React component for displaying scratch card with customizable image size in your web app.
Downloads
7
Readme
react-scratchcard
A react component for displaying scratch card in your web app.
Installation
$ npm i @clreddy21/react-scratchcard-with-custom-imagesize
Example
import React from 'react';
import ScratchCard from 'react-scratchcard';
const settings = {
width: 200,
height: 200,
image: 'image.jpg',
finishPercent: 50,
onComplete: () => console.log('The card is now clear!')
};
const Example = () =>
<ScratchCard {...settings}>
Congratulations! You WON!
</ScratchCard>;
Credits
Heavily inspired by this pen by André Ruffert.
Image used in the example by webtreats.