JSFiddle - React, Tailwind, and code Playground

by Clément Rigo

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/Vue.Draggable/2.24.0/vuedraggable.umd.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/1.8.10/tailwind.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<div id="app">
  <div style="p-4 bg-ray-100" v-for="item in lists">
    {{ item.name }}
  </div>
</div>

JavaScript

var vm = new Vue({
  el: "#app",
  data: {
			list: [
      	{
        	name: "Title 1",
          children: [
            {name: 'Children 1'},
            {name: 'Children 2'},
          ]
        },
        {
        	name: "Title 2",
          children: [
            {name: 'Children 3'},
            {name: 'Children 4'},
          ]
        }
      ]
  }
});