A beautiful React component that makes it easy to implement falling snow effects with twinkling animation.
Using npm:
npm install react-snow-twinkle
Or using yarn:
yarn add react-snow-twinkle
React Snow Twinkle is a lightweight and customizable React component that adds a mesmerizing snow effect to your web applications. Perfect for creating winter-themed websites or adding a magical touch to your user interface.
import { Snowfall } from 'react-snow-twinkle';
function App() {
return (
<div>
<Snowfall />
{/* Your content */}
</div>
);
}
import { Snowfall } from 'react-snow-twinkle';
function App() {
return (
<div>
<Snowfall
snowflakeCount={100}
fallSpeed={8}
flakeSize={15}
opacity={0.8}
flakeShape="*"
/>
{/* Your content */}
</div>
);
}
Prop | Type | Default | Description |
---|---|---|---|
snowflakeCount | number | 50 | Number of snowflakes on screen (max 700) |
fallSpeed | number | 2 | Snowflake falling speed (1-20) |
flakeSize | number | 10 | Snowflake size (in px, max 100px) |
opacity | number | 1 | Snowflake opacity (0-1) |
flakeShape | string | “❄️” | Snowflake shape (emoji, text, etc.) |
We welcome contributions! If you’d like to contribute:
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any issues or suggestions, please let us know through GitHub Issues.