1.1.2 • Published 7 years ago

react-scratchcard v1.1.2

Weekly downloads
314
License
MIT
Repository
github
Last release
7 years ago

react-scratchcard

A react component for displaying scratch card in your web app.

Demo

http://allu.io/react-scratchcard

Installation

$ npm install react-scratchcard

Example

import React from 'react';
import ScratchCard from 'react-scratchcard';

const settings = {
  width: 640,
  height: 480,
  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.

1.1.2

7 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago