Skip to content

DKunin/vue-contribution-calendar

Repository files navigation

Vue Contribution Calendar

Vue component to reproduce github contribution calendar with zero dependecies.

  • Example: Example

  • Live demo, be sure to checkout the course and click on the rectangles - have fun!

Table of Contents

Install

    npm install vue-contribution-calendar

Usage

In any your vue file:

    <template>
        <contributionCalendar :history="history" :year="2016" :cellClick="someMethod" />
    </template>

    <script>
      import contributionCalendar from 'vue-contribution-calenadar';

      export default {
        components: {
          contributionCalendar
        },
        methods: {
          someMethod(date, value) {
            ...
          }
        },
        data() {
          return {
            history: {
              '20-12-2016': 7,
               ...
              '11-1-2016': 1 
            }
          }
        },
      }
    </script>

Contribute

Fork, run:

    npm run watch

and patch away.

License

MIT © Dmitri Kunin

About

Simple svg contribution calendar component for vue

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published