2.0.5 • Published 2 years ago

react-simple-scratch-card-v1 v2.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

NPM React React React React React NPM

Installation

npm install simple-scratch-card --save

Description

It is a modified version of the lesca-react-scratch-card. I need some extra features in that. So I created a simple-scratch-card. And a lot of thanks to lesca-react-scratch-card 🥳🎉

Requirement

Use react v18+.

Usage

Import the package

import ScratchCard from 'simple-scratch-card';
import Image from './img/cover.jpg';

In the compnenet

const component = () => {
  return (
    <ScratchCard
      cover={Image}
      percent={50}
      width={100}
      height={100}
      onComplete={() => {
        // Some code here
      }}
    >
      Your card content
    </ScratchCard>
  );
};

Development

Props

Propsdescriptiondefault
cover:stringscratch card cover image
width:numbercard width320
height:numbercard height240
percent:numberhow much percent to complete it?50
onComplete:functioncallback when complete
2.0.5

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.0

2 years ago