0.2.0 • Published 5 years ago

vue-drag-select v0.2.0

Weekly downloads
119
License
MIT
Repository
github
Last release
5 years ago

Vue Drag to Select Component

A Vue component for drag selecting elements. Inspired by react-drag-select.

Demo

  • Visit the demo here.

Usage

  • Add vue-drag-select to your project:
$ yarn add vue-drag-select # or npm i --save vue-drag-select
  • Import the component and add it to your template:
import DragSelect from 'vue-drag-select/src/DragSelect.vue'

export default {
  components: {
    'drag-select-container': DragSelect
  }
}
  • Wrap the items that you want to be selectable in the drag-select-container with a selectorClass property and a scoped slot:
<template>
  <drag-select-container selectorClass="itemToBeSelected">
    <template slot-scope="{ selectedItems }">
      <!-- Your items here -->
    </template>
  </drag-select-container>
</template>
  • Then write your own logic to make items look selected. For instance by applying a class.

License

MIT

0.2.0

5 years ago

0.1.5

6 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago