GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - spireworks/vue-confetti: A Vue component for dropping confetti

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

107 Commits
107 Commits

Folders and files

NameName
Last commit message
Last commit date
demo
demo
 
 
src
src
 
 
tests
tests
 
 
.babelrc
.babelrc
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
commitlint.config.js
commitlint.config.js
 
 
example.gif
example.gif
 
 
jest.config.js
jest.config.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
release.config.js
release.config.js
 
 
webpack.config.js
webpack.config.js
 
 

Repository files navigation

vue-confetti

npm version semantic-release

🎉 A Vue component for dropping confetti 🎉

Example animation

View the demo

Installation

npm install vue-confetti --save

Usage

<template>
  <main>
    <button @click="start">Start</button>
    <button @click="stop">Stop</button>
    <button @click="love">Show some love</button>
  </main>
</template>

<script>
  import Vue from 'vue'
  import VueConfetti from 'vue-confetti'

  Vue.use(VueConfetti)

  export default {
    methods: {
      start() {
        this.$confetti.start();
      },

      stop() {
        this.$confetti.stop();
      }

      love() {
        this.$confetti.update({
          shape: 'heart',
          colors: [
            'red',
            'pink',
            '#ba0000'
          ],
        });
      }
    }
  }
</script>

Configuration

The following options can be passed to $confetti.start() or $confetti.update():

Property Type Description Default
shape String The shape of the confetti ('circle', 'rect', or 'heart'). 'circle'
size Number The size of the particles (should be a positive number). 10
dropRate Number The speed at which the particles fall. 10
colors Array The confetti colors. ['DodgerBlue', 'OliveDrab', 'Gold', 'pink', 'SlateBlue', 'lightblue', 'Violet', 'PaleGreen', 'SteelBlue', 'SandyBrown', 'Chocolate', 'Crimson']

Example

$confetti.start({
  shape: 'heart',
  colors: [
    'red',
    'pink',
    '#ba0000',
  ],
});

Development

The following scripts are available for local development:

# test
npm run test

# run with webpack watch
npm run dev

# build for production
npm run build

Note that vue-confetti enforces conventional commits to help automate the release process. Whenever code is merged into master the next semantic version number is automatically determined, a changelog generated and the release published.

About

A Vue component for dropping confetti

Resources

Readme
MIT license
Activity
Custom properties

Stars

1 star

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.