DataTables jQuery UI Integration

2.3.7 · active · verified Wed Apr 22

The `datatables.net-jqui` package provides an integration layer to style DataTables instances using the jQuery UI theming framework. It extends the core DataTables library, allowing developers to leverage existing jQuery UI themes for a consistent look and feel across their applications. The current stable version is 2.3.7, though a 3.0.0-beta.1 release indicates upcoming major changes. This package focuses solely on presentation and requires both the core `datatables.net` library and `jquery-ui` to function correctly. Its release cadence is generally tied to major DataTables and relevant jQuery UI updates. It differentiates itself by offering a specific, highly customizable theming option for DataTables users who are already invested in the jQuery UI ecosystem, ensuring visual harmony with other jQuery UI widgets.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize a DataTables instance with jQuery UI styling, including necessary CSS and JavaScript imports via CDN, and a basic HTML table structure.

<!-- Include jQuery, jQuery UI, DataTables core, and DataTables JQUI CSS -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/themes/base/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/2.0.7/css/dataTables.jqueryui.min.css">

<!-- Your HTML table -->
<table id="myDataTable" class="display" style="width:100%">
  <thead>
    <tr>
      <th>Name</th>
      <th>Position</th>
      <th>Office</th>
      <th>Age</th>
      <th>Start date</th>
      <th>Salary</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Tiger Nixon</td>
      <td>System Architect</td>
      <td>Edinburgh</td>
      <td>61</td>
      <td>2011/04/25</td>
      <td>$320,800</td>
    </tr>
    <tr>
      <td>Garrett Winters</td>
      <td>Accountant</td>
      <td>Tokyo</td>
      <td>63</td>
      <td>2011/07/25</td>
      <td>$170,750</td>
    </tr>
  </tbody>
</table>

<script type="module">
  import $ from 'jquery';
  import 'jquery-ui/ui/widgets/button'; // Example for a common JQUI widget
  import 'datatables.net';
  import 'datatables.net-jqui';

  $(document).ready(function() {
    $('#myDataTable').DataTable({
      // JQUI-specific options can be added here if needed
      // For example, to explicitly enable JQUI renderer (often default if plugin loaded)
      // renderer: 'jqueryui'
    });
  });
</script>

view raw JSON →