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
rDmqDDMqa5$67.00
pending
gabriel32@yahoo.com
gMJjlG65CE$367.00
failed
melinda_glover@gmail.com
tSS9gH6CjF$233.00
pending
chester_hudson21@gmail.com
ZwCb5dUCG1$382.00
pending
sister72@yahoo.com
CWBEYC0Ybi$48.00
failed
myrna.vonrueden@hotmail.com
Rows per page:
Page 1 of 20

Basic

NameEmailLocationStatusBalance
Edgar Lockmanpaula78@yahoo.comPort Jasonchester
Active
$302.34
Vincent Weberida_tromp@yahoo.comLake Jorge
Active
$107.57
Kristina Doylebryant.bayer35@yahoo.comSuffolk
Inactive
$384.40
Miss Charlene Hamillorlando47@hotmail.comBradleycester
Inactive
$426.23
Dr. Erna Langworthruben.langworth@hotmail.comLueilwitzview
Active
$1,186.16
Total$2,406.70

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
1546Unbranded Plastic SaladTools
$266.73
74
9303Handcrafted Wooden ChairMusic
$372.71
18
5480Sleek Plastic SoapOutdoors
$64.52
7
3141Elegant Silk SausagesTools
$333.15
99
5023Unbranded Cotton CarHealth
$395.06
100
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
#O1CSPMiss Tierra Bergnaum PhDisrael.marquardt96@gmail.comAdminEngineeringInactive
#JO1RXDayana Muellerkayla64@gmail.comMemberSalesActive
#FTIVPSunny Schoenlorena7@yahoo.comViewerMarketingActive
#ZCPZWMr. Marcos Padbergtitus_stark75@gmail.comAdminSupportActive
#8924SLila Reichertraquel.thiel@gmail.comMemberEngineeringActive
#5SQHGRodger Rolfsonsalma_nienow50@yahoo.comViewerSalesInactive
#BLZ3XFlorence Ortizalda_hettinger16@hotmail.comAdminMarketingActive
#VXFMNVincent Rogahncheyenne.schinner@hotmail.comMemberSupportActive
#_I4MSZachery Handstanton.torp53@hotmail.comViewerEngineeringActive
#SAAG6Gladys Ornjany81@yahoo.comAdminSalesActive
Rows per page:
Page 1 of 10

Expansion

Expandable rows to display additional details using the expansion feature.

Name
Email
Role
Status
Mr. Delbert Heathcotebilly30@gmail.comAdminActive
Felicita Hoppeheidi.pfannerstill@hotmail.comViewerActive
Billie Ritchiefred.strosin@gmail.comAdminActive
Marlen Welch MDzachary.heaney58@yahoo.comMemberActive
Glenn Ryanshanie.bernier95@hotmail.comAdminActive
Colten Boehmlaurel_graham41@hotmail.comViewerActive
Delia Osinskieileen.homenick-hills@hotmail.comViewerActive
Kathy Dietrichreilly_sauer@yahoo.comViewerInactive
Aylin Ernserrachel_yost21@hotmail.comViewerActive
Zachariah Fadel IVdean.kreiger@yahoo.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
Lura Schinnergilbert27@hotmail.comSalesInactive
Norbert Bahringerbennie.heathcote8@hotmail.comSalesInactive
Velma Roberts Vfrankie22@yahoo.comSupportActive
Amy Heidenreichsherman.stoltenberg10@hotmail.comMarketingInactive
Kailey Aufderhar Jr.brisa.luettgen79@hotmail.comSalesActive
Shelley Pagacprovidenci.blick76@gmail.comSalesActive
Kendall Brakusbrendon_grimes@gmail.comSupportInactive
Dr. Warren Willnathen_lynch36@gmail.comSupportActive
Randall Baumbachhettie.christiansen-waelchi@gmail.comMarketingInactive
Geoffrey Kuvalisadrian_weissnat@hotmail.comMarketingInactive
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
4PQWTDEvelynWisozkevelyn_wisozk@yahoo.com(411) 999-81747429 Ebert Key Suite 298SupportInactive
NKGO0FAlvisOrtizalvis.ortiz@gmail.com(398) 611-58014040 Albion Street Apt. 767SupportInactive
CW_NP5AlisonKuphalalison_kuphal31@gmail.com(388) 758-947720830 Eunice Valleys Suite 434MarketingActive
VAMIMCAdolphusMacejkovicadolphus_macejkovic59@gmail.com(750) 999-456547810 Price Courts Suite 364MarketingActive
8-0XELKristiFerrykristi_ferry@gmail.com(875) 241-662983512 Hazel Close Apt. 654MarketingActive
5GJOSAKennedyFraneykennedy_franey@gmail.com(823) 262-117266355 Bashirian Glens Suite 990SupportInactive
ODANTWLeeHahnlee_hahn@gmail.com(584) 658-156222640 Bath Road Apt. 511SalesInactive
C0JUYBSaraKassulkesara_kassulke33@gmail.com(467) 203-8261252 Weimann Mount Suite 320MarketingActive
Rows per page:
Page 1 of 1
Pinned columns
None

Context Menu

Name
Email
Role
Department
Status
Mamie Howeagustin.white@yahoo.comAdminSalesInactive
Ramiro Trantowadella33@hotmail.comMemberEngineeringInactive
Cecil Jenkinsdavion_kertzmann@hotmail.comMemberSalesInactive
Ms. Lillian Rathorlando_sanford@gmail.comAdminSalesActive
Mrs. Pearl Howelldillan_nolan31@hotmail.comAdminEngineeringInactive
Ahmad Casper Jr.hermina.lakin65@hotmail.comViewerEngineeringActive
Braxton Franeyally.wunsch96@gmail.comViewerSalesInactive
Jettie Beiergloria36@hotmail.comAdminMarketingInactive
Josiane Schroederterrell2@hotmail.comMemberSupportActive
Mr. Joel Abshirecolten.doyle21@gmail.comAdminSupportActive
Rows per page:
Page 1 of 2