3rd-Party Plugins

DataTables.net

DataTables.net is a JavaScript table library with sorting, pagination, and search. Use it directly with the Metronic Tailwind toolkit—no wrapper required. Styling is provided by the datatables-net.css component.

Installation

DataTables.net can be installed via NPM or included from a CDN. For NPM, add datatables.net to your package.json . During the Theme Installation process, the build tools copy the vendor script into /dist/assets/vendors/datatables-net . Alternatively, use the CDN links shown in Require Assets .
NPM: npm install datatables.net CDN: https://cdn.datatables.net/2.0.8/js/dataTables.min.js (and optional default CSS if not using Metronic overrides).

Require Assets

To use DataTables.net in your pages, include the DataTables script and ensure the Metronic component styles are loaded. The toolkit's datatables-net.css (via styles.css ) overrides default DataTables styling so tables match the Metronic Tailwind design.
				
					<!DOCTYPE html>
<html>
 <head>
  <!-- Core styles (includes datatables-net component styling) -->
  <link href="/dist/assets/css/styles.css" rel="stylesheet"/>
 </head>
 <body>
  <table class="display" id="example">
  </table>
  <!-- Core bundle script -->
  <script src="/dist/assets/js/core.bundle.js">
  </script>
  <!-- jQuery (required by DataTables.net npm build) -->
  <script src="/dist/assets/vendors/jquery/jquery.min.js">
  </script>
  <!-- DataTables.net -->
  <script src="/dist/assets/vendors/datatables-net/dataTables.min.js">
  </script>
  <!-- Your page script -->
  <script src="/dist/assets/js/pages/plugins/datatables-net/basic.js">
  </script>
 </body>
</html>

				
			

Customization

Metronic integrates DataTables.net via CSS only. No custom JavaScript wrapper is required—use the official DataTables.net API ( new DataTable(table, options) ) directly. The file src/css/components/datatables-net.css is included in the component bundle and overrides the table wrapper, header, body, pagination, search input, and controls using @layer components , Metronic CSS variables (e.g. --border , --background , --radius-md ), and Tailwind @apply . Dark mode is supported through the same variables so tables follow the active theme.

Basic

A basic DataTables.net table with static data. Initialize with new DataTable(table, options) ; no wrapper required. The table uses the Metronic-styled component from datatables-net.css .
Name Position Office Age Start date
Tiger Nixon System Architect Edinburgh 61 2011/04/25
Garrett Winters Accountant Tokyo 63 2011/07/25
Ashton Cox Junior Technical Author San Francisco 66 2009/01/12
Cedric Kelly Senior Javascript Developer Edinburgh 22 2012/03/29
Airi Satou Accountant Tokyo 33 2008/11/28
Brielle Williamson Integration Specialist New York 61 2012/12/02
Herrod Chandler Sales Assistant San Francisco 59 2012/08/06
Rhona Davidson Integration Specialist Tokyo 55 2010/10/14
Colleen Hurst Javascript Developer San Francisco 39 2009/09/15
Sonya Frost Software Engineer Edinburgh 23 2008/12/13
Jena Gaines Office Manager London 30 2008/12/19
Quinn Flynn Support Lead Edinburgh 22 2013/03/03
Charde Marshall Regional Director San Francisco 36 2008/10/16
Haley Kennedy Senior Marketing Designer London 43 2012/12/18
Tatyana Fitzpatrick Regional Director London 19 2010/03/17
Michael Silva Marketing Designer London 66 2012/11/27
Paul Byrd Chief Financial Officer New York 64 2010/06/09
Gloria Little Systems Administrator New York 59 2009/04/10
Bradley Greer Software Engineer London 41 2012/10/13
Dai Rios Personnel Lead Edinburgh 35 2012/09/26
Jenette Caldwell Development Lead New York 30 2011/09/03
Yuri Berry Chief Marketing Officer New York 40 2009/06/25
Caesar Vance Pre-Sales Support New York 21 2011/12/12
Doris Wilder Sales Assistant Sydney 23 2010/09/20
Angelica Ramos Chief Executive Officer London 47 2009/10/09
Gavin Joyce Developer Edinburgh 42 2010/12/22

Pagination

DataTables.net pagination is enabled by default. Use pageLength and lengthMenu to control rows per page and the length selector.
Name Position Office Age
Tiger Nixon System Architect Edinburgh 61
Garrett Winters Accountant Tokyo 63
Ashton Cox Junior Technical Author San Francisco 66
Cedric Kelly Senior Javascript Developer Edinburgh 22
Airi Satou Accountant Tokyo 33
Brielle Williamson Integration Specialist New York 61
Herrod Chandler Sales Assistant San Francisco 59
Rhona Davidson Integration Specialist Tokyo 55
Colleen Hurst Javascript Developer San Francisco 39
Sonya Frost Software Engineer Edinburgh 23
Jena Gaines Office Manager London 30
Quinn Flynn Support Lead Edinburgh 22
Charde Marshall Regional Director San Francisco 36
Haley Kennedy Senior Marketing Designer London 43
Tatyana Fitzpatrick Regional Director London 19
Michael Silva Marketing Designer London 66
Paul Byrd Chief Financial Officer New York 64
Gloria Little Systems Administrator New York 59
Bradley Greer Software Engineer London 41
Dai Rios Personnel Lead Edinburgh 35
Jenette Caldwell Development Lead New York 30
Yuri Berry Chief Marketing Officer New York 40
Caesar Vance Pre-Sales Support New York 21
Doris Wilder Sales Assistant Sydney 23
Angelica Ramos Chief Executive Officer London 47
Gavin Joyce Developer Edinburgh 42
The search box filters table rows as you type. Use search options to set initial value or disable the search input.

Sorting

Click column headers to sort. Use order for initial sort and columns.orderable to disable sorting on specific columns.
Name Position Office Age Start date
Tiger Nixon System Architect Edinburgh 61 2011/04/25
Garrett Winters Accountant Tokyo 63 2011/07/25
Ashton Cox Junior Technical Author San Francisco 66 2009/01/12
Cedric Kelly Senior Javascript Developer Edinburgh 22 2012/03/29
Airi Satou Accountant Tokyo 33 2008/11/28
Brielle Williamson Integration Specialist New York 61 2012/12/02
Herrod Chandler Sales Assistant San Francisco 59 2012/08/06
Rhona Davidson Integration Specialist Tokyo 55 2010/10/14
Colleen Hurst Javascript Developer San Francisco 39 2009/09/15
Sonya Frost Software Engineer Edinburgh 23 2008/12/13
Jena Gaines Office Manager London 30 2008/12/19
Quinn Flynn Support Lead Edinburgh 22 2013/03/03
Charde Marshall Regional Director San Francisco 36 2008/10/16
Haley Kennedy Senior Marketing Designer London 43 2012/12/18
Tatyana Fitzpatrick Regional Director London 19 2010/03/17
Michael Silva Marketing Designer London 66 2012/11/27
Paul Byrd Chief Financial Officer New York 64 2010/06/09
Gloria Little Systems Administrator New York 59 2009/04/10
Bradley Greer Software Engineer London 41 2012/10/13
Dai Rios Personnel Lead Edinburgh 35 2012/09/26
Jenette Caldwell Development Lead New York 30 2011/09/03
Yuri Berry Chief Marketing Officer New York 40 2009/06/25
Caesar Vance Pre-Sales Support New York 21 2011/12/12
Doris Wilder Sales Assistant Sydney 23 2010/09/20
Angelica Ramos Chief Executive Officer London 47 2009/10/09
Gavin Joyce Developer Edinburgh 42 2010/12/22

Server-Side Processing

Use serverSide: true and ajax to let the server handle paging, sorting, and search. The preview uses a mock endpoint; replace the URL with your API and ensure the response format matches DataTables server-side format .
Name Position Office Age