Tailwind CSS Datatables - Flowbite
Use the datatable component to search, sort, filter, export and paginate table data of rows and columns for your web application coded with the utility classes from Tailwind CSS
The datatable component examples from Flowbite are open-source under the MIT License and they are based on the simple-datatables repository from GitHub which you need to install via NPM or CDN.
This page provides multiple examples of datatable components where you can search, sort, filter, paginate and export table data up to thousands of entries coded with Tailwind CSS and leveraging JavaScript code provided by the parent library.
All examples are responsive, dark mode and RTL support included and by installing the Flowbite plugin the custom styles will automatically be applied to the datatable components using Tailwind CSS.
Getting started #
Before continuing make sure that you have Tailwind CSS, Flowbite, and Simple Datables in your project.
-
Install Tailwind CSS and follow our quickstart guide to install Flowbite and the official plugin
-
Install the
simple-datatables
library using NPM:
npm install simple-datatables --save
Alternatively, you can also include it in your project using CDN:
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
Now that you have installed all libraries you can start copy-pasting the datatable components from Flowbite.
Make sure that in addition to the HTML markup you also copy the JavaScript code to initialize the component.
Default datatable #
Use this example to show table data with default sorting and pagination functionalities.