1.0.2 • Published 2 years ago
@layankumarasinghe/react-snow-effect v1.0.2
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-effectUsage
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" />