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 NixonSystem ArchitectEdinburgh612011/04/25
Garrett WintersAccountantTokyo632011/07/25
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29
Airi SatouAccountantTokyo332008/11/28
Brielle WilliamsonIntegration SpecialistNew York612012/12/02
Herrod ChandlerSales AssistantSan Francisco592012/08/06
Rhona DavidsonIntegration SpecialistTokyo552010/10/14
Colleen HurstJavascript DeveloperSan Francisco392009/09/15
Sonya FrostSoftware EngineerEdinburgh232008/12/13
Jena GainesOffice ManagerLondon302008/12/19
Quinn FlynnSupport LeadEdinburgh222013/03/03
Charde MarshallRegional DirectorSan Francisco362008/10/16
Haley KennedySenior Marketing DesignerLondon432012/12/18
Tatyana FitzpatrickRegional DirectorLondon192010/03/17
Michael SilvaMarketing DesignerLondon662012/11/27
Paul ByrdChief Financial OfficerNew York642010/06/09
Gloria LittleSystems AdministratorNew York592009/04/10
Bradley GreerSoftware EngineerLondon412012/10/13
Dai RiosPersonnel LeadEdinburgh352012/09/26
Jenette CaldwellDevelopment LeadNew York302011/09/03
Yuri BerryChief Marketing OfficerNew York402009/06/25
Caesar VancePre-Sales SupportNew York212011/12/12
Doris WilderSales AssistantSydney232010/09/20
Angelica RamosChief Executive OfficerLondon472009/10/09
Gavin JoyceDeveloperEdinburgh422010/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 NixonSystem ArchitectEdinburgh61
Garrett WintersAccountantTokyo63
Ashton CoxJunior Technical AuthorSan Francisco66
Cedric KellySenior Javascript DeveloperEdinburgh22
Airi SatouAccountantTokyo33
Brielle WilliamsonIntegration SpecialistNew York61
Herrod ChandlerSales AssistantSan Francisco59
Rhona DavidsonIntegration SpecialistTokyo55
Colleen HurstJavascript DeveloperSan Francisco39
Sonya FrostSoftware EngineerEdinburgh23
Jena GainesOffice ManagerLondon30
Quinn FlynnSupport LeadEdinburgh22
Charde MarshallRegional DirectorSan Francisco36
Haley KennedySenior Marketing DesignerLondon43
Tatyana FitzpatrickRegional DirectorLondon19
Michael SilvaMarketing DesignerLondon66
Paul ByrdChief Financial OfficerNew York64
Gloria LittleSystems AdministratorNew York59
Bradley GreerSoftware EngineerLondon41
Dai RiosPersonnel LeadEdinburgh35
Jenette CaldwellDevelopment LeadNew York30
Yuri BerryChief Marketing OfficerNew York40
Caesar VancePre-Sales SupportNew York21
Doris WilderSales AssistantSydney23
Angelica RamosChief Executive OfficerLondon47
Gavin JoyceDeveloperEdinburgh42
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 NixonSystem ArchitectEdinburgh612011/04/25
Garrett WintersAccountantTokyo632011/07/25
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29
Airi SatouAccountantTokyo332008/11/28
Brielle WilliamsonIntegration SpecialistNew York612012/12/02
Herrod ChandlerSales AssistantSan Francisco592012/08/06
Rhona DavidsonIntegration SpecialistTokyo552010/10/14
Colleen HurstJavascript DeveloperSan Francisco392009/09/15
Sonya FrostSoftware EngineerEdinburgh232008/12/13
Jena GainesOffice ManagerLondon302008/12/19
Quinn FlynnSupport LeadEdinburgh222013/03/03
Charde MarshallRegional DirectorSan Francisco362008/10/16
Haley KennedySenior Marketing DesignerLondon432012/12/18
Tatyana FitzpatrickRegional DirectorLondon192010/03/17
Michael SilvaMarketing DesignerLondon662012/11/27
Paul ByrdChief Financial OfficerNew York642010/06/09
Gloria LittleSystems AdministratorNew York592009/04/10
Bradley GreerSoftware EngineerLondon412012/10/13
Dai RiosPersonnel LeadEdinburgh352012/09/26
Jenette CaldwellDevelopment LeadNew York302011/09/03
Yuri BerryChief Marketing OfficerNew York402009/06/25
Caesar VancePre-Sales SupportNew York212011/12/12
Doris WilderSales AssistantSydney232010/09/20
Angelica RamosChief Executive OfficerLondon472009/10/09
Gavin JoyceDeveloperEdinburgh422010/12/22

Empty table

Demonstrates zero-row state with custom language.emptyTable copy and normal controls.
Name Position Office Age

Column visibility

Use external checkboxes to show or hide columns with column().visible().
NamePositionOfficeAge
Tiger NixonSystem ArchitectEdinburgh61
Garrett WintersAccountantTokyo63
Ashton CoxJunior Technical AuthorSan Francisco66
Cedric KellySenior Javascript DeveloperEdinburgh22
Airi SatouAccountantTokyo33
Brielle WilliamsonIntegration SpecialistNew York61
Herrod ChandlerSales AssistantSan Francisco59
Rhona DavidsonIntegration SpecialistTokyo55
Colleen HurstJavascript DeveloperSan Francisco39
Sonya FrostSoftware EngineerEdinburgh23

Multi-column order

Initial ordering uses multiple columns; users can still change sort directly from headers.
NamePositionOfficeAge
Tiger NixonSystem ArchitectEdinburgh61
Garrett WintersAccountantTokyo63
Ashton CoxJunior Technical AuthorSan Francisco66
Cedric KellySenior Javascript DeveloperEdinburgh22
Airi SatouAccountantTokyo33
Brielle WilliamsonIntegration SpecialistNew York61
Herrod ChandlerSales AssistantSan Francisco59
Rhona DavidsonIntegration SpecialistTokyo55
Colleen HurstJavascript DeveloperSan Francisco39
Sonya FrostSoftware EngineerEdinburgh23
Calculates numeric totals with footerCallback for the current page.

Row index

Adds a page-relative index column that updates on paging and sorting.
#NamePositionOffice
Tiger NixonSystem ArchitectEdinburgh61
Garrett WintersAccountantTokyo63
Ashton CoxJunior Technical AuthorSan Francisco66
Cedric KellySenior Javascript DeveloperEdinburgh22
Airi SatouAccountantTokyo33
Brielle WilliamsonIntegration SpecialistNew York61
Herrod ChandlerSales AssistantSan Francisco59
Rhona DavidsonIntegration SpecialistTokyo55
Colleen HurstJavascript DeveloperSan Francisco39
Sonya FrostSoftware EngineerEdinburgh23

Internationalisation (French)

Shows non-English DataTables UI strings and locale formatting for currency and dates.
EmployeVilleSalaireDate
Tiger NixonEdinburgh3208002011-04-25
Garrett WintersTokyo1707502011-07-25
Ashton CoxSan Francisco860002009-01-12
Cedric KellyEdinburgh4330602012-03-29

Fixed header

DataTables.net table with a fixed (sticky) header that stays visible when scrolling. Uses the official datatables.net-fixedheader plugin and the fixedHeader: { header: true } option. The table uses the Metronic-styled component from datatables-net.css.
Name Position Office Age Start date
Tiger NixonSystem ArchitectEdinburgh612011/04/25
Garrett WintersAccountantTokyo632011/07/25
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29
Airi SatouAccountantTokyo332008/11/28
Brielle WilliamsonIntegration SpecialistNew York612012/12/02
Herrod ChandlerSales AssistantSan Francisco592012/08/06
Rhona DavidsonIntegration SpecialistTokyo552010/10/14
Colleen HurstJavascript DeveloperSan Francisco392009/09/15
Sonya FrostSoftware EngineerEdinburgh232008/12/13
Jena GainesOffice ManagerLondon302008/12/19
Quinn FlynnSupport LeadEdinburgh222013/03/03
Charde MarshallRegional DirectorSan Francisco362008/10/16
Haley KennedySenior Marketing DesignerLondon432012/12/18
Tatyana FitzpatrickRegional DirectorLondon192010/03/17
Michael SilvaMarketing DesignerLondon662012/11/27
Paul ByrdChief Financial OfficerNew York642010/06/09
Gloria LittleSystems AdministratorNew York592009/04/10
Bradley GreerSoftware EngineerLondon412012/10/13
Dai RiosPersonnel LeadEdinburgh352012/09/26
Jenette CaldwellDevelopment LeadNew York302011/09/03
Yuri BerryChief Marketing OfficerNew York402009/06/25
Caesar VancePre-Sales SupportNew York212011/12/12
Doris WilderSales AssistantSydney232010/09/20
Angelica RamosChief Executive OfficerLondon472009/10/09
Gavin JoyceDeveloperEdinburgh422010/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

Scrollable table body (tbody)

DataTables.net table with a fixed-height, vertically scrollable body. Use the scrollY option so the table body scrolls within a set height while the header stays visible. The table uses the Metronic-styled component from datatables-net.css.
Name Position Office Age Start date
Tiger NixonSystem ArchitectEdinburgh612011/04/25
Garrett WintersAccountantTokyo632011/07/25
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29
Airi SatouAccountantTokyo332008/11/28
Brielle WilliamsonIntegration SpecialistNew York612012/12/02
Herrod ChandlerSales AssistantSan Francisco592012/08/06
Rhona DavidsonIntegration SpecialistTokyo552010/10/14
Colleen HurstJavascript DeveloperSan Francisco392009/09/15
Sonya FrostSoftware EngineerEdinburgh232008/12/13
Jena GainesOffice ManagerLondon302008/12/19
Quinn FlynnSupport LeadEdinburgh222013/03/03
Charde MarshallRegional DirectorSan Francisco362008/10/16
Haley KennedySenior Marketing DesignerLondon432012/12/18
Tatyana FitzpatrickRegional DirectorLondon192010/03/17
Michael SilvaMarketing DesignerLondon662012/11/27
Paul ByrdChief Financial OfficerNew York642010/06/09
Gloria LittleSystems AdministratorNew York592009/04/10
Bradley GreerSoftware EngineerLondon412012/10/13
Dai RiosPersonnel LeadEdinburgh352012/09/26
Jenette CaldwellDevelopment LeadNew York302011/09/03
Yuri BerryChief Marketing OfficerNew York402009/06/25
Caesar VancePre-Sales SupportNew York212011/12/12
Doris WilderSales AssistantSydney232010/09/20
Angelica RamosChief Executive OfficerLondon472009/10/09
Gavin JoyceDeveloperEdinburgh422010/12/22

Column filter

Each column title has a filter icon; clicking it opens a dropdown with the filter control (Name: select, Office: text, Age: min/max). A single DataTables.net custom search predicate reads those controls and the table redraws on change. Uses jQuery and DataTables.net only.
Name
Position
Office
Age
Tiger NixonSystem ArchitectEdinburgh61
Garrett WintersAccountantTokyo63
Ashton CoxJunior Technical AuthorSan Francisco66
Cedric KellySenior Javascript DeveloperEdinburgh22
Airi SatouAccountantTokyo33
Brielle WilliamsonIntegration SpecialistNew York61
Herrod ChandlerSales AssistantSan Francisco59
Rhona DavidsonIntegration SpecialistTokyo55
Colleen HurstJavascript DeveloperSan Francisco39
Sonya FrostSoftware EngineerEdinburgh23
Jena GainesOffice ManagerLondon30
Quinn FlynnSupport LeadEdinburgh22
Charde MarshallRegional DirectorSan Francisco36
Haley KennedySenior Marketing DesignerLondon43
Tatyana FitzpatrickRegional DirectorLondon19
Michael SilvaMarketing DesignerLondon66
Paul ByrdChief Financial OfficerNew York64
Gloria LittleSystems AdministratorNew York59
Bradley GreerSoftware EngineerLondon41
Dai RiosPersonnel LeadEdinburgh35
Jenette CaldwellDevelopment LeadNew York30
Yuri BerryChief Marketing OfficerNew York40
Caesar VancePre-Sales SupportNew York21
Doris WilderSales AssistantSydney23
Angelica RamosChief Executive OfficerLondon47
Gavin JoyceDeveloperEdinburgh42