# datatables.net-buttons

> Buttons for DataTables

Latest version **4.0.3** (published 2026-09-11) · MIT license · 200.1K weekly downloads

## Install

```sh
npm install datatables.net-buttons
pnpm add datatables.net-buttons
yarn add datatables.net-buttons
bun add datatables.net-buttons
```

## Health

**Score 80/100 (A)** — status: active.

Positive: moderate downloads; has types; esm support; no vulnerabilities; recently updated; high maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.3 |
| Published | 2026-09-11 |
| First published | 2015-10-07 |
| Weekly downloads | 200.1K |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 457.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 138 |
| Author | SpryMedia Ltd |
| Maintainers | datatables |
| Keywords | Buttons, Column Visibility, csv, excel, pdf, print, Datatables, table, filter, sort |

## Links

- npm: https://www.npmjs.com/package/datatables.net-buttons
- Repository: https://github.com/DataTables/Buttons
- Homepage: https://datatables.net
- Issues: https://datatables.net/forums
- npm.io page: https://npm.io/package/datatables.net-buttons

## Dependencies (1)

- [datatables.net](https://npm.io/package/datatables.net.md) ^3

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads
- [@regulaforensics/document-reader-webclient](https://npm.io/package/@regulaforensics/document-reader-webclient.md) — 7.8K weekly downloads

## Recent versions

- 4.0.3 (latest) — 2026-09-11
- 4.0.0-beta.1 (beta) — 2026-04-07
- 2.4.3 (dt1-compat) — 2024-02-19
- 4.0.2 — 2026-08-18
- 4.0.1 — 2026-07-31
- 4.0.0 — 2026-07-24
- 3.2.6 — 2025-12-23
- 3.2.5 — 2025-09-09
- 3.2.4 — 2025-07-02
- 3.2.3 — 2025-04-25
- 3.2.2 — 2025-02-06
- 3.2.1 — 2025-01-22
- 3.2.0 — 2024-11-12
- 3.1.2 — 2024-08-30
- 3.1.1 — 2024-08-01
- … 52 more at https://npm.io/package/datatables.net-buttons/versions

## README

# Buttons

The Buttons extension for DataTables provides a common set of options, API methods and styling to display buttons on a page that will interact with a DataTable. Modules are also provided for data export, printing and column visibility control.


# Installation

To use Buttons the primary way to obtain the software is to use the [DataTables downloader](//datatables.net/download). You can also include the individual files from the [DataTables CDN](//cdn.datatables.net). See the [documentation](http://datatables.net/extensions/buttons/) for full details.

## NPM and Bower

If you prefer to use a package manager such as NPM or Bower, distribution repositories are available with software built from this repository under the name `datatables.net-buttons`. Styling packages for Bootstrap, Foundation and other styling libraries are also available by adding a suffix to the package name.

Please see the DataTables [NPM](//datatables.net/download/npm) and [Bower](//datatables.net/download/bower) installation pages for further information. The [DataTables installation manual](//datatables.net/manual/installation) also has details on how to use package managers with DataTables.


# Basic usage

Buttons is initialised using the `buttons` option in the DataTables constructor, giving an array of the buttons that should be shown. Further options can be specified using this option as an object - see the documentation for details. For example:

```js
$(document).ready( function () {
    $('#example').DataTable( {
    	buttons: [ 'csv', 'excel', 'pdf', 'print' ]
    } );
} );
```


# Documentation / support

* [Documentation](https://datatables.net/extensions/buttons/)
* [DataTables support forums](http://datatables.net/forums)


# GitHub

If you fancy getting involved with the development of Buttons and help make it better, please refer to its [GitHub repo](https://github.com/DataTables/Buttons)

---
_Source: https://npm.io/package/datatables.net-buttons · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
