Home

Awesome

Liquor Tree

A Vue tree component that allows you to present hierarchically organized data in a nice and logical manner.

documentation | demos

Features

Installation

Npm:

$ npm install liquor-tree

Yarn:

$ yarn add liquor-tree

Live Playground

To run that demo on your own computer:

There are a lot of examples for you. All sources of stories are located in liquor-tree/docs/storybook/stories.

Usage

  <!-- Vue Component -->
  <template>
    <tree
        :data="items"
        :options="options"
        ref="tree"
    />
  </template>

  <script>
    import Vue from 'Vue'
    import LiquorTree from 'liquor-tree'

    Vue.use(LiquorTree)

    export default {
      ...
      data() {
        return {
          items: [
            {text: 'Item 1'},
            {text: 'Item 2'},
            {text: 'Item 3', children: [
              {text: 'Item 3.1'},
              {text: 'Item 3.2'}
            ]}
          ],
          options: {
            checkbox: true
          }
        }
      }
      ...
    }
  </script>

Development

Check out the package.jsons script section. There are 2 scripts:

License

MIT