vue-snowf

Snowfall component for Vue.js -- Let it snow on your page! ❄
14,743 43
Install
npm install vue-snowf
Latest Version:0.0.2
Vue:2
License:MIT
Last Updated:Dec 5, 2020
Links: GitHub  ·  npm
Maintainer: fuxy526

vue-snowf

Snowfall component for Vue.js -- Let it snow on your page! ❄

Install

npm:
npm install vue-snowf --save

Usage

import Snowf from 'vue-snowf';

// Add Snowf to the components
export default {
  components: {
	  Snowf
  },
  ...
}

// Insert component in the template
<Snowf
  :amount="50"
  :size="5"
  :speed="1.5"
  :wind="0"
  :opacity="0.8"
  :swing="1"
  :image="null"
  :zIndex="null"
  :resize="true"
  color="#fff"
/>

Default Options

Argument Type Default Value Description
amount Number 50 Number of snowflakes displayed at a time.
size Number 5 Size of snowflakes.
speed Number 1.5 Vertical speed of snowflakes. The larger, the snowflakes drop faster.
wind Number 0 Horizontal wind power. Wind will blow right if this is a positive number, and a negative number makes wind blow left.
color String '#fff' Color of snowflakes. This option accepts HEX or RGB color code, such as "#fff", "#ffffff", "rgb(255,255,255)".
opacity Number 0.8 The max opacity of snowflakes. The plugin will generate snowflakes with different opacity from 0 to this number.
swing Number 1 Swing offset of snowflakes. If you don't want them to swing, set this option as 0.
image String null Set this option to replace the snowflake with your image.
zIndex Number null Position of the canvas layer. Set the layer front or back by changing this value.
resize Boolean true Adjust canvas size and snowflakes position automatically or not.

Others

snowf (use snowf with Vanilla JS)
react-snowf (use snowf with React)

Licence

vue-snowf is open source and released under the MIT Licence.

Copyright (c) 2017 Fuxy526

Related Packages

vsnow

Snowfall effect for Vue js

3,472 4
vue-niege

_Let it snow on your Vue applications!_

4,750 30
vue-snowfall

A Vue 3 composable for creating snowfall effects

3,161 10
nuxt-particles

Run lightweight, heavily customizable particle simulations in your Nuxt project...

61,447 37
pgz-comp-av2

介绍 vue2.x + ant design vue 1.7.x系列的各类业务小组件。如果觉得集成麻烦,可以直...

3,617

Version History

Version Released License
0.0.2 MIT
0.0.1 MIT