react-thanos-snap-effect

0.0.4 • Public • Published

react-thanos-snap

Thanos snap effect by redstapler wrapped in react

Original Code can be found from https://redstapler.co/thanos-snap-effect-javascript-tutorial/

How to use

Add this package to your react app project

NPM

npm install react-thanos-snap-effect

Usage

  • import { SnapWrapper } from 'react-thanos-snap-effect'
  • Warp the components in <SnapWrapper>{/** Put your components here **/}</SnapWrapper>
  • Start your dev server, click the thanos snap button on the Page
  • Props can be called:
    • delay: delay in milliseconds to trigger the snap effect after click Thanos button
    • resume: 0/null - do not resume element automatically , 1/auto - resume element automatically after delay * 10 milliseconds

Examples

  • Run npm install && npm start

Dependencies

  • Production: Jquery, chance, html2canvas, React^16
  • Dev: css-loader, url-loader

Work in Progress

  • Able to randomly select a child element and snap!
  • Able to randomly select multiple child element and snap in sequences.

Credit

All Credit Goes to red stapper with his great tutorial.

License

MIT

Package Sidebar

Install

npm i react-thanos-snap-effect

Weekly Downloads

4

Version

0.0.4

License

MIT

Unpacked Size

146 kB

Total Files

9

Last publish

Collaborators

  • fuleinist