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
MlYhBZHo8M$238.00
pending
sherwood_daugherty@yahoo.com
RARhDgmHw1$107.00
failed
marilyn_klein52@hotmail.com
YsMyJqhp3P$594.00
pending
nina90@yahoo.com
rQ0B55voMt$11.00
failed
claudine23@gmail.com
L6ZJBGj4nC$58.00
failed
francis25@gmail.com
Rows per page:
Page 1 of 20

Basic

NameEmailLocationStatusBalance
Suzanne Kuhic IVcharlie_kuhlman87@yahoo.comOkunevaview
Active
$741.07
Kayla Pagacsterling_toy@yahoo.comMattburgh
Active
$565.03
Marjory Hamillgene99@hotmail.comSanta Monica
Active
$868.05
Mrs. Alexa Kulassara_waters@yahoo.comPort Jett
Active
$444.85
Jameson Kundemalachi.nolan53@gmail.comEast Dean
Inactive
$686.12
Total$3,305.12

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
6820Rustic Aluminum FishAutomotive
$429.97
67
1247Modern Marble ComputerMovies
$27.60
76
5543Sleek Gold TowelsShoes
$239.73
43
5465Recycled Steel CheeseGames
$376.95
3
5449Small Rubber ShirtKids
$107.64
24
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
#KJ_P4Cornelius Wuckertsantos.cronin79@yahoo.comAdminEngineeringInactive
#LD8QSKayli O'Harasammie75@yahoo.comMemberSalesActive
#CL1QVMamie Raynorrico_kuhic68@gmail.comViewerMarketingActive
#DT4A4Jason Collieralverta.witting33@hotmail.comAdminSupportActive
#L8E1YRashad Heathcote Sr.vicente39@gmail.comMemberEngineeringActive
#TJWQBMoriah Leuschkederrick.zulauf@yahoo.comViewerSalesInactive
#WZSXLJay Nitzsche MDolin.hessel@gmail.comAdminMarketingActive
#AYMDUJeffrey Gradyjakayla.kling47@yahoo.comMemberSupportActive
#ZU0RYClaire Tremblaytyreek.lehner33@hotmail.comViewerEngineeringActive
#RC5R3Dallin Gusikowskiabagail12@yahoo.comAdminSalesActive
Rows per page:
Page 1 of 10

Expansion

Expandable rows to display additional details using the expansion feature.

Name
Email
Role
Status
Blake Hicklereginald_abbott32@hotmail.comMemberInactive
Ms. Kellie Kubdale_kuvalis@yahoo.comAdminInactive
Georgianna Klockocaroline_erdman@yahoo.comMemberInactive
Gretchen Von PhDteri_gibson82@yahoo.comViewerInactive
Pedro Kiehn Jr.kaleigh84@hotmail.comMemberInactive
Gilbert Torpgarrett24@hotmail.comAdminInactive
Clark Luettgenmarc_nitzsche51@hotmail.comAdminInactive
Connie Keeblerkrista16@yahoo.comViewerInactive
Amara Robertskimberly.gislason83@hotmail.comAdminInactive
Chester Pricesimone_prohaska@gmail.comMemberActive
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
Tyreek Skilescyrus_effertz@hotmail.comMarketingActive
Wilbur Luettgenlena.morar66@gmail.comSupportActive
Shanna Murphycharlotte.haley70@gmail.comSupportActive
Antonia Rodriguezagustin57@yahoo.comSalesInactive
Roxanne Dickinsonxavier.reinger-dach@hotmail.comEngineeringActive
Blanca Kemmergeorgia_bernier95@hotmail.comSalesActive
Barbara Koss Vclinton.romaguera@hotmail.comSalesInactive
Leigh Legrosletha62@hotmail.comEngineeringActive
Jimmy Okunevalouise.raynor42@yahoo.comSupportActive
Keeley Legrosdiana52@hotmail.comEngineeringActive
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
O4QVOHCurtBernhardcurt.bernhard48@hotmail.com(919) 656-22839054 Hamill Wells Apt. 292SupportInactive
MEVGNQTashaRosenbaumtasha_rosenbaum21@hotmail.com(240) 991-483539833 Bobbie Brook Apt. 187MarketingActive
W5QM98MyrtisReichertmyrtis.reichert0@hotmail.com(601) 876-095229019 Deshaun Divide Suite 980MarketingInactive
MFDXNWGladysSwaniawskigladys_swaniawski52@hotmail.com(955) 886-9120564 Moen Plain Suite 724SupportInactive
STSFPFBrownPaucekbrown_paucek94@hotmail.com(856) 317-64617858 Tennyson Road Suite 772MarketingInactive
VSAKRXRafaelCartwrightrafael.cartwright@hotmail.com(932) 925-57163639 Mills Hills Apt. 929EngineeringInactive
6ONGDNMyrtleKshlerinmyrtle.kshlerin@gmail.com(816) 783-880554209 Raynor Forest Suite 172SupportInactive
CZKXMPLoyceRitchieloyce_ritchie@yahoo.com(628) 692-924184345 Kathleen Circle Apt. 535MarketingInactive
Rows per page:
Page 1 of 1
Pinned columns
None

Context Menu

Name
Email
Role
Department
Status
Dovie Connellydorothy_huel@hotmail.comViewerMarketingInactive
Gwendolyn Sengerjimmy.mccullough81@yahoo.comViewerEngineeringActive
Catalina Larsonlucie13@yahoo.comMemberEngineeringActive
Mr. Aleen Rippin Iocie.crooks@gmail.comMemberEngineeringInactive
Terrell Harris Imafalda.lynch@hotmail.comAdminSupportInactive
Lavinia McKenziemable70@gmail.comViewerMarketingInactive
Seth Pfannerstilllynne_keebler@hotmail.comMemberEngineeringActive
Kay Thiel IIjennie_monahan@yahoo.comAdminEngineeringActive
Aletha Schambergercamilla.schaden@yahoo.comAdminMarketingInactive
Brock Romaguerashane12@yahoo.comViewerMarketingActive
Rows per page:
Page 1 of 2