Dual Multi Select Component For Vue – List Picker

A dual list picker component for Vue.js that enables the users to move list items between two panels.

How to use it:

1. Install and import the list picker component.

import Vue from 'vue'
import VueListPicker from 'vue-list-picker'

2. Register the component.

Vue.use(VueListPicker)

// or
export default {
  components: {
    VueListPicker
  }
}

3. Insert the component into the template.

<template>
  <vue-list-picker 
    :left-items="leftItems"
    :right-items="rightItems"
    />
</template>

4. Define the left/right items.

export default {  
  data() {
    const example1 = {
      key: 1,
      content: 'Item 1'
    }
    const example2 = {
      key: 2,
      content: 'Item 2'
    }
    const example3 = {
      key: 3,
      content: 'Item 3'
    }
    const example4 = {
      key: 4,
      content: 'Item 4'
    }
    
    const leftItems = [example1, example2]
    const rightItems = [example3, example4]

    return { leftItems, rightItems }
  }
}

5. All possible props.

leftItems: {
  type: Array,
  required: true
},
rightItems: {
  type: Array,
  required: true
},
movedItemLocation: {
  type: String,
  default: 'top' // or 'bottom'
},
titleLeft: {
  type: String,
  default: 'Items available'
},
titleRight: {
  type: String,
  default: 'Items selected'
},
titleCentered: {
  type: Boolean,
  default: true
},
titleClass: {
  type: String,
  default: ''
},
titleSubstr: {
  type: Number,
  default: 20
},
buttonClass: {
  type: String,
  default: ''
},
contentKey: {
  type: String,
  default: 'key'
},
contentAttr: {
  type: String,
  default: 'content'
},
contentCentered: {
  type: Boolean,
  default: false
},
contentClass: {
  type: String,
  default: ''
},
contentSubstr: {
  type: Number,
  default: 23
},
minHeight: {
  type: String,
  default: '450px'
},
height: {
  type: String,
  default: ''
},
minWidth: {
  type: String,
  default: '220px'
},
width: {
  type: String,
  default: ''
}

Preview:

Dual Multi Select Component For Vue - List Picker

Changelog:

v0.3.0 (12/08/2021)

  • improving images performance a little bit
  • remove space in style

v0.2.0 (09/28/2020)

  • upgrade dependencies, version, scripts and lock. change let/const

Download Details:

Author: guastallaigor

Live Demo: https://vuelistpicker.now.sh/

Download Link: https://github.com/guastallaigor/vue-list-picker/archive/master.zip

Official Website: https://github.com/guastallaigor/vue-list-picker

Install & Download:

Add Comment