Getting Started

The easiest way to get try Frappe DataTable is using this codesandbox demo.

Example using CDN

<!-- include styles -->
<link href="https://unpkg.com/frappe-datatable@0.0.5/dist/frappe-datatable.min.css" rel="stylesheet">

<!-- create the container element -->
<div id="datatable"></div>

<!-- include the dependencies -->
<script src="https://unpkg.com/sortablejs@1.7.0/Sortable.min.js"></script>
<script src="https://unpkg.com/clusterize.js@0.18.0/clusterize.min.js"></script>
<!-- include the lib -->
<script src="https://unpkg.com/frappe-datatable@0.0.5/dist/frappe-datatable.min.js"></script>

<!-- initialize DataTable -->
<script>
  const datatable = new DataTable('#datatable', {
    columns: ['Name', 'Position', 'Salary'],
    data: [
      ['Faris', 'Software Developer', '$1200'],
      ['Manas', 'Software Engineer', '$1400'],
    ]
  });
</script>