rainmaker-react
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

Rainmaker React Component

This React Component generates a rain effect in an html canvas. Check out a demo of it here: demo

How to use

  1. Install from npm:
npm install rainmaker-react
  1. Import the React Component in your file
import { RainEffect } from "rainmaker-react";
  1. Use the default React Component for use your customize your own properties
import React from "react";

const App: React.FC = () => {
  return (
    <div>
      {/* default */}
      <RainEffect />

      {/* custom */}
      <RainEffect
        className="rain-effect"
        count={COUNT}
        wind={WIND}
        fps={FPS}
        fallSpeed={FALLSPEED}
        jitterX={JITTER}
        dropletLength={LENGTH}
        dropletWidth={WIDTH}
        dropletStyle={STYLE}
        bgStyle={BGSTYLE}
        noBackground={NO_BACKGROUND}
      />
    </div>
  );
};

Package Sidebar

Install

npm i rainmaker-react

Weekly Downloads

0

Version

0.1.6

License

MIT

Unpacked Size

17.7 kB

Total Files

13

Last publish

Collaborators

  • jaywhyfan