New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-snowflakes

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-snowflakes

Fancy snowfall React component

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
37
27.59%
Maintainers
1
Weekly downloads
 
Created
Source

React Snowflakes

Frank Sinatra

“Let it snow on your React website!” – Frank Sinatra1

How to use?

import {DepthOfFieldSnowfall} from 'react-snowflakes';

// Insert anywhere in your code and that's it!
<DepthOfFieldSnowfall count={50}
                      style={{
                        // Position must be relative or absolute,
                        // because snowflakes are positioned absolutely.
                        position: 'relative',
                        width: '300px',
                        height: '300px'
                      }}/>

You can have more control over snowflakes with Snowfall:

import {Snowfall, Snowflake} from 'react-snowflakes';

<Snowfall count={50}
          style={{
            position: 'relative',
            width: '300px',
            height: '300px'
          }}
          snowflakeFactory={index => {
            const size = index / count;
            const w = 5 + 10 * size + 'px';
            return (
              <Snowflake speed={.05 + size * 2}
                         xSpeedPrc={.3 * size}
                         ySpeedPrc={.1 * size}
                         style={{
                           width: w,
                           height: w,
                           borderRadius: '50%',
                           backgroundColor: 'white',
                           opacity: .2 + .8 * size,
                           filter: `blur(${Math.round(Math.max(size - .5, 0) * 15)}px)`
                         }}/>
            )
          }}/>

License

The code is available under MIT licence.

Keywords

react

FAQs

Package last updated on 28 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts