@sweatco/rn-scratch-card
v1.2.5
Published
React Native Scratch Card which temporarily hides content from user
Readme
rn-scratch-card
React Native Scratch Card which temporarily hides content from a user

Check out it on dribble.
Installation
yarn add @sweatco/rn-scratch-cardPublished on npm as @sweatco/rn-scratch-card; the unscoped rn-scratch-card stops at 1.2.4.
Usage
import { ScratchCard } from '@sweatco/rn-scratch-card'
// ...
<ScratchCard
source={require('./scratch_foreground.png')}
brushWidth={50}
onScratch={handleScratch}
style={styles.scratch_card}
/>source accepts a bundled asset (require(...)) or a remote image ({ uri: 'https://…' }). Remote images load asynchronously and are cached in memory.
Example project setup
cd rn-scratch-card
yarn install
cd example
yarn install
yarn run react-native run-iosIf you are launching project under iOS, please, also remember to
cd ios
pod installContributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
