@layankumarasinghe/react-snow-effect

1.0.2 • Public • Published

react-snow-effect

@layankumarasinghe/react-snow-effect is a simple React component that adds a snowfall effect to your web application. It utilizes jQuery for animation and can be easily integrated into React projects.

Installation

npm install @layankumarasinghe/react-snow-effect

Usage

import React from 'react';
import SnowEffect from '@layankumarasinghe/react-snow-effect';

const YourComponent = () => {
  return (
    <div>
      {/* Your React component content */}
      <SnowEffect />
      {/* ... */}
    </div>
  );
};

export default YourComponent;

Props

The SnowEffect component accepts the following optional props:

  • minSize: Minimum size of snowflake (default: 10).
  • maxSize: Maximum size of snowflake (default: 20).
  • total: The number of flakes generated (default: 25).
  • speed: Speed of flakes when falling down (default: dynamically calculated based on document height).
  • flakeColor: Color of snowflake (default: '#FFFFFF').

Example with Custom Props:

<SnowEffect minSize={5} maxSize={15} total={50} speed={200} flakeColor="#00FF00" />

Readme

Keywords

Package Sidebar

Install

npm i @layankumarasinghe/react-snow-effect

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

3.24 kB

Total Files

3

Last publish

Collaborators

  • layankumarasinghe