vue-nestable

npm install --save vue-nestable
Drag & drop hierarchical list made as a vue component

Just a list

This is about as minimal as it gets. We just render a list of individual items.

  1. [0] Andy
  2. [1] Harry
    1. [0] David
  3. [2] Lisa

Sort items by drag & drop

Wrap your item in a vue-nestable-handle to allow it to be dragged.

  1. Andy
  2. Harry
    1. David
  3. Lisa

Advanced (Drag handle, Classes, and Hooks)

You can customize how deeply items can be nested as well what the id prop is called.
In this example we also add custom css classes for each item, and added a hook that prevents one item from being nested.

  1. Item :: Andy
  2. Item :: Harry
    1. Item :: David
  3. Item :: Lisa
  4. Item :: I can not be nested

Draggable across different lists

You can drag items across different lists if you set the group property to the same value.

  1. Andy
  2. Harry
    1. David
  3. Lisa
  1. Mike
  2. Edgar

Customize the placeholder text

You can display a placeholder when there are no items in the list.

  1. This list is empty

    You can add items by dragging them here from the list above.

RTL Support

Add the rtl prop to support RTL languages.

  1. Andy
  2. Harry
    1. David
  3. Lisa