Tanstack Table

A powerful datatable for your app built with TanStack Table.

Source code

Click to see the source code for this component on GitHub. Feel free to copy it and adjust it for your own use.

Installation

Usage

Regular

ID
Amount
Status
Email
8iJk9Zj40P$47.00
success
ansley80@hotmail.com
Zx4GPivryn$940.00
success
nolan.ebert10@yahoo.com
EXKHm7RPvL$994.00
processing
arvel.dickens@gmail.com
7t6vlmzSL2$662.00
pending
lola.tremblay78@gmail.com
alagkBExGp$681.00
success
pamela.feeney@gmail.com
Rows per page:
Page 1 of 20

Basic

NameEmailLocationStatusBalance
Harry Bartolettinoemy_lowe@gmail.comDavisview
Inactive
$65.20
Jackie Treuteldanny_brakus@gmail.comVista
Active
$441.44
Jeremiah Ornhowell_olson24@hotmail.comGennaroboro
Active
$283.90
Dr. Alyssa Morarova97@gmail.comMannfort
Active
$1,163.41
Maxine Howe Inathen_kuhlman22@gmail.comKiarafield
Active
$843.57
Total$2,797.52

Basic data table made with TanStack Table

Filters

Keyword
Intents
Volume
CPC
Traffic
Link
react components
I
N
2.5K2.588https://www.originui.com
buy react templates
C
T
1.9K4.7565https://www.originui.com/templates
react ui library
I
C
3.2K3.25112https://www.originui.com/docs
tailwind components download
T
8901.9545https://www.originui.com/download
react dashboard template free
C
T
4.1K5.5156https://www.originui.com/templates/dashboard
how to use react components
I
1.2K1.2542https://www.originui.com/tutorials
react ui kit premium
C
T
7606.828https://www.originui.com/pricing
react component documentation
I
N
9501.835https://www.originui.com/docs/components

Data table with filters made with TanStack Table

Simple (Auto-Generated Columns)

Shows zero-config usage with automatic column generation from data keys.

Id
Date
Status
Email
Amount
46002024-03-11T15:30:00paidjames.anderson@example.com594
45992024-03-11T10:10:00failedmia.white@example.com276
45982024-03-11T08:50:00refundedwilliam.brown@example.com315
45972024-03-10T19:45:00paidemma.davis@example.com529
45962024-03-10T15:55:00paidethan.harris@example.com639
Rows per page:
Page 1 of 1

Custom Columns

Custom column definitions with formatted cells and styled badges.

#
Date
Status
Email
Amount
#4600Mar 11, 15:30Paidjames.anderson@example.com
$594.00
#4599Mar 11, 10:10Failedmia.white@example.com
$276.00
#4598Mar 11, 08:50Refundedwilliam.brown@example.com
$315.00
#4597Mar 10, 19:45Paidemma.davis@example.com
$529.00
#4596Mar 10, 15:55Paidethan.harris@example.com
$639.00
Rows per page:
Page 1 of 1

With Slots

Using slots to customize cell rendering with avatars and dropdowns.

User
Email
Role

Lindsay Walton

@lindsayw

lindsay.walton@example.comMember

Courtney Henry

@courtneyh

courtney.henry@example.comAdmin

Tom Cook

@tomc

tom.cook@example.comMember

Whitney Francis

@whitneyf

whitney.francis@example.comAdmin
Rows per page:
Page 1 of 1

Table footer with column totals using aggregation functions.

#
Description
Qty
Amount
1Web Design
3
$1,200.00
2Development
5
$2,400.00
3Consulting
2
$800.00
4Support
4
$600.00
Total
14
$5,000.00
Rows per page:
Page 1 of 1

Clean table without footer controls for simple layouts.

Name
Email
Status
John Doejohn@example.comActive
Jane Smithjane@example.comActive
Bob Johnsonbob@example.comInactive

Loading State

Table with loading indicator - includes custom loader slot support.

ID
Product
Category
Price
Stock
7036Licensed Gold SaladBaby
$492.06
26
2067Generic Rubber TunaMusic
$230.29
45
5917Licensed Rubber HatBaby
$405.10
66
7929Electronic Cotton PizzaTools
$478.14
56
5475Electronic Marble BaconHealth
$449.33
63
Rows per page:
Page 1 of 3

Server-Side Pagination

Manual pagination with server-side data fetching and search. Enable manual-pagination prop and listen to the @update:pagination event.

95 total users
ID
Name
Email
Role
Department
Status
#IDH1_Maryann Lindgrenjulianne_ritchie@hotmail.comAdminEngineeringInactive
#KIR0MLuther Lindgrenaglae.schroeder78@yahoo.comMemberSalesActive
#SM7XXMindy Zemlak Vfreida61@hotmail.comViewerMarketingActive
#DZOW5Leland Batz IIIjerel.macgyver@gmail.comAdminSupportActive
#YLWETKendra Jastflavie.gibson37@gmail.comMemberEngineeringActive
#KVUP4Mr. Eddie Blockmaryse2@gmail.comViewerSalesInactive
#8QBPBTommy Johnsjovany_legros@yahoo.comAdminMarketingActive
#_BQLIWillis Cartwrightstanton.ruecker1@hotmail.comMemberSupportActive
#ZU-ROJoshua Walterlionel_fritsch12@hotmail.comViewerEngineeringActive
#96WHXTony Armstrong Vjeanne36@gmail.comAdminSalesActive
Rows per page:
Page 1 of 10

Expansion

Expandable rows to display additional details using the expansion feature.

Name
Email
Role
Status
Ramiro Colliercharles_wiza@gmail.comMemberInactive
Mildred Abshirejeffry.dubuque@hotmail.comAdminActive
Troy O'Hara-Blandaleta_waelchi91@hotmail.comMemberActive
Rochelle Starklayne_bashirian@hotmail.comMemberInactive
Joel Reillyjerod_halvorson@yahoo.comViewerActive
Ella Kassulkesandy_gislason27@yahoo.comAdminInactive
Rosalie Brekke Sr.pedro_funk52@gmail.comViewerInactive
Maggie Parkerjessyca_king@yahoo.comViewerActive
Christine Quitzonsusan_shanahan@yahoo.comMemberInactive
Katie Rogahn DDSnicholas91@hotmail.comAdminInactive
Rows per page:
Page 1 of 2

Row Pinning

Pin rows to the top or bottom. The table emits update:rowPinning and row-pin so parents can sync state.

Use the pin menu to choose top, bottom, or unpin.
Pin
Name
Email
Department
Status
Orlando Zemlak PhDbessie7@gmail.comSupportInactive
Dr. Kelvin Murazik Jr.freeman_mosciski@gmail.comEngineeringActive
Irvin Schneiderdamian68@gmail.comEngineeringInactive
Ryan Manteclementine_herman@gmail.comSalesInactive
Dr. Cornelius Nienowkeanu90@yahoo.comSupportInactive
Felipe Koepptrisha.huel@hotmail.comSupportActive
Jacqueline Russelkelvin.leuschke@hotmail.comSalesActive
Darrell Brekkechristina.jacobs50@yahoo.comEngineeringActive
Gilberto Walkerjuston58@hotmail.comEngineeringInactive
Faith Lemkehertha.moen4@hotmail.comSupportActive
Rows per page:
Page 1 of 2

Column Pinning

Opt-in header pin buttons let you pin columns left or right. Pinned columns are sticky to the table edges; override --ui-table-pinned-bg in CSS if you need a different background. Use enable-column-pinning and show-column-pin-buttons to render the controls, and listen to update:columnPinning / column-pin if you need to sync state.

Pin columns with the header menu: choose left, right, or unpin.
ID
First Name
Last Name
Email
Phone
Address
Department
Status
XMXEB-AustynPriceaustyn_price9@gmail.com(231) 377-3605243 Bernier Falls Suite 423EngineeringActive
LYVGTSAustynPriceaustyn.price18@yahoo.com(440) 746-5348792 The Ridgeway Suite 478SupportInactive
IHAYIFAustynPriceaustyn.price74@yahoo.com(696) 202-95524033 Donnelly Mill Apt. 876SupportInactive
WN_DZ6AustynPriceaustyn_price@gmail.com(889) 245-76565765 Cormier Harbors Apt. 656SupportInactive
ST_Q4MAustynPriceaustyn.price51@hotmail.com(419) 882-9897340 Ena Parkways Apt. 572MarketingInactive
7QI1OGAustynPriceaustyn.price@yahoo.com(225) 542-967288386 Herman Park Apt. 763SalesInactive
ZKTDL4AustynPriceaustyn_price@hotmail.com(760) 553-62446838 Ryan Manors Suite 403EngineeringActive
SLV58BAustynPriceaustyn.price@gmail.com(675) 541-6381102 Antonia Squares Suite 682SupportInactive
Rows per page:
Page 1 of 1
Pinned columns
None

Context Menu

Name
Email
Role
Department
Status
Kay VonRuedenkeegan_king14@gmail.comMemberEngineeringInactive
Dewey Kuhicjoaquin_feeney7@gmail.comViewerEngineeringInactive
Phillip Tremblaydejuan.larkin3@gmail.comViewerMarketingInactive
Benjamin Mitchellasha94@hotmail.comAdminSupportInactive
Ms. Melba Stamm IIImarlen.pfannerstill@hotmail.comAdminSalesActive
Esther Gutmannmelany_quigley@gmail.comViewerEngineeringInactive
Miss Jacqueline Bednareryn.bernier@hotmail.comViewerSalesActive
Dr. Tonya Skilesadrien54@gmail.comAdminMarketingActive
Dr. Louis Baileyeve.heidenreich@hotmail.comViewerSupportInactive
Viola MacGyverhassan.turner@gmail.comAdminSalesInactive
Rows per page:
Page 1 of 2