Download

The best method for getting a hold of DataTables for use in your project depends upon your programming environment. The download builder below provides a simple method that you can use to build your own custom DataTables package - including only the software that you need, and providing options to have it hosted on the DataTables CDN, download the package locally or install through a package manager such as npm, yarn or bower.

Step 1. Choose a styling framework

DataTables' default styling.
v1.10.16
One of the most popular styling libraries around.
v3.3.7
The latest iteration of the ever popular Bootstrap framework.
v4.0.0-beta
A modern responsive styling framework.
v6.4.3
A collection of Javascript widgets as well as a styling framework.
v1.12.1
A styling framework that treats words and classes as exchangeable concepts.
v2.2.13

Step 2. Select packages

DataTables requires jQuery. Don't select either version if you already have it.
v3.2.1
Use for compatibility with older browsers. jQuery 3 requires IE9+.
v1.12.3
Don't select if you already have _STYLE_ on your page.
Enhance HTML tables with advanced interaction controls.
v1.10.16
Add full editing controls to your DataTables.
Editor is a commercial extension for DataTables, it requires a license to use it for longer than the free trial period. Please create an account or login to be able to include Editor in the package.
v1.7.0

Extensions

Excel-like click and drag copying and filling of data.
v2.2.2
A common framework for user interaction buttons.
v1.5.0
End user buttons to control column visibility.
v1.5.0
Create Excel, PDF, CSV files and copy data from the table. For legacy browsers.
v1.5.0
Copy to clipboard and create Excel, PDF and CSV files from the table's data.
v1.5.0
Required for the Excel HTML5 export button.
v2.5.0
Required for the PDF HTML5 export button.
v0.1.32
Button that will display a printable view of the table.
v1.5.0
Click-and-drag column reordering.
v1.4.1
Fix one or more columns to the left or right of a scrolling table.
v3.2.4
Sticky header and / or footer for the table.
v3.1.3
Keyboard navigation of cells in a table, just like a spreadsheet.
v2.3.2
Dynamically show and hide columns based on the browser size.
v2.2.1
Show similar data grouped together by a custom data point.
v1.0.2
Click-and-drag reordering of rows.
v1.2.3
Virtual rendering of a scrolling table for large data sets.
v1.4.3
Adds row, column and cell selection abilities to a table.
v1.2.4

Step 3. Pick a download method

  • CDN
  • Download
  • NPM
  • Yarn
  • Bower

The DataTables CDN provides a convenient way to quickly get started with DataTables. The DataTables software is hosted on the CDN (powered by CloudFlare) and you simply need to include the HTML and CSS files as directed below.

Use minified files for smaller files sizes and faster downloads.
Combine files together for a, typically, faster download.

When selected, pdfmake is loaded from CDNJS rather than the DataTables CDN.

The files required for the link and script tags shown above can be downloaded using the button below. The package is downloaded as a zip file which should be unzipped and uploaded to your web-server.

Download files

NPM is the package manager that ships with the popular Node.JS framework and is used extensively for both client-side and server-side packages.

Install

Use the following to install the selected software in your package:

The Editor NPM package is a holding and install package only. You will still need to download Editor. The NPM package contains a script that can be run to install the required files into node_modules. See this post for more details.

Module require

To be able to use the selected software in your package, use the following code:

When used with CommonJS, the DataTables packages all export a factory function that can be executed with two optional arguments (shown without above):

  1. The window object to use (this is require as jQuery in a headless CommonJS environment can require a window with a document attached). If no parameter is given, or it is falsy, window will be used.
  2. The jQuery object that DataTables should be attached to. If no parameter is given, the package will do its own require('jquery') to include jQuery.

For example if you wish to use your own `window` and `jQuery` parameters:

var $  = require( 'jquery' );
var dt = require( 'datatables.net' )( window, $ );

Please note that the above is shown for CommonJS modules. If you are using an AMD loader, you do not need to execute the required library (i.e. remove the trailing ()).

Yarn is a package manager that makes use of the NPM registry, and so has access to all of the same packages.

Install

Use the following to install the selected software in your package:

The Editor NPM package is a holding and install package only. You will still need to download Editor. The NPM package contains a script that can be run to install the required files into node_modules. See this post for more details.

Module require

To be able to use the selected software in your package, use the following code:

When used with CommonJS, the DataTables packages all export a factory function that can be executed with two optional arguments (shown without above):

  1. The window object to use (this is require as jQuery in a headless CommonJS environment can require a window with a document attached). If no parameter is given, or it is falsy, window will be used.
  2. The jQuery object that DataTables should be attached to. If no parameter is given, the package will do its own require('jquery') to include jQuery.

For example if you wish to use your own `window` and `jQuery` parameters:

var $  = require( 'jquery' );
var dt = require( 'datatables.net' )( window, $ );

Please note that the above is shown for CommonJS modules. If you are using an AMD loader, you do not need to execute the required library (i.e. remove the trailing ()).

Bower is a popular client-side package manager, and while it has now largely been supplanted by npm / yarn, there are still a number of older projects that use it.

Install