Tables

Tables

Build tables with the table class, then layer on modifiers for stripes, hover states, borders, cell spacing, dark or color-1 accents, sizing, sticky headers, and scroll affordances — no custom CSS required.

Default Table

Add the class table to the table element to get the default style.

FirstnameLastnameEmail
JohnDoe[email protected]
KimDoe[email protected]
DanDoe[email protected]

Striped Table

Add the classes table table-striped.

FirstnameLastnameEmail
JohnDoe[email protected]
KimDoe[email protected]
DanDoe[email protected]
Striped Table Color-1

Add the classes table table-striped-color-1.

FirstnameLastnameEmail
JohnDoe[email protected]
KimDoe[email protected]
DanDoe[email protected]

Hover Table

Add the classes table table-hover.

FirstnameLastnameEmail
JohnDoe[email protected]
KimDoe[email protected]
DanDoe[email protected]
Hover Table Color-1

Add the classes table table-hover-color-1.

FirstnameLastnameEmail
JohnDoe[email protected]
KimDoe[email protected]
DanDoe[email protected]

Bordered Table

Add the classes table table-bordered.

FirstnameLastnameEmail
JohnDoe[email protected]
KimDoe[email protected]
DanDoe[email protected]
Bordered Table Color-1

Add the classes table table-bordered-color-1.

FirstnameLastnameEmail
JohnDoe[email protected]
KimDoe[email protected]
DanDoe[email protected]

Cell Separate Table

Add the class table table-cell-separate (or table-cell-separate-color-1), optionally with table-cell-border-none.

FirstnameLastnameEmail
JohnDoe[email protected]
KimDoe[email protected]
DanDoe[email protected]
Cell Separate Color-1, No Cell Borders
FirstnameLastnameEmail
JohnDoe[email protected]
KimDoe[email protected]
DanDoe[email protected]

Dark Header / Footer / First & Last Column

Combine table-dark-header, table-dark-footer, table-dark-1st-col, table-dark-last-col — or the table-color-1-* equivalents for an accent tint.

Color-1 Header / Footer

Table Height

Add table-compact, or table-large-2x through table-large-5x, to control row height.

FirstnameLastnameEmailCityCountryAge
JohnDoe[email protected]MontrealCanada30
KimDoe[email protected]KharkovUkraine25
Table Large 2x, with Fixed Cell Height

For fixed-height cells with independent scrolling, wrap the cell content in a div using mh-1rem through mh-10rem, plus overflow-y-auto, overflow-y-scroll, or overflow-hidden.

FirstnameLastnameEmailCityCountryAge
John
2nd line
3rd line
Doe
Montreal
Canada
30

Responsive & Fixed-Layout Table

Wrap the table in a div with overflow-x-auto so wide tables scroll horizontally on small screens instead of breaking layout. Add table-layout-fixed plus table-td-w-5rem / table-td-w-10rem / table-td-w-15rem for predictable column widths.

FirstnameLastnameEmailCityCountryAge
JohnDoe[email protected]MontrealCanada30
KimDoe[email protected]KharkovUkraine25

Sticky Table Header

Give the container a bounded height with overflow-y-auto, then add position-sticky top-0 z-2 to the header cells. Because table-dark-header / table-color-1-header already paint an opaque background on th, the header stays legible as rows scroll beneath it. For an un-tinted header, pair position-sticky top-0 z-2 with bg-panel so the sticky cells don't turn transparent over the scrolling body.

Sticky Dark Header
Month Leads Sales
January12060
February18090
March200110
April16080
May220120
June240130
July210100
August230115
September19095
October250135
November260140
December300160
Sticky Neutral Header (Color-1 accent text)
Firstname Lastname Email
JohnDoe[email protected]
KimDoe[email protected]
DanDoe[email protected]
AlexReyes[email protected]
PriyaShah[email protected]
MarcoRossi[email protected]
NinaPetrov[email protected]
SamLee[email protected]
GraceOkafor[email protected]
LeoFischer[email protected]

Floating Scroll Buttons — All Directions

For tables too wide and too tall to see at a glance, anchor circular button controls to the corners of a position-relative wrapper with position-absolute plus top-1, bottom-1, left-1, or right-1. Each button calls the container's native scrollTo — no framework JavaScript required, this is a page-level enhancement.

Firstname Lastname Email City Country Age Role
JohnDoe[email protected]MontrealCanada30Engineer
KimDoe[email protected]KharkovUkraine25Designer
AlexReyes[email protected]AustinUSA34PM
PriyaShah[email protected]PuneIndia28Analyst
MarcoRossi[email protected]MilanItaly41Sales
NinaPetrov[email protected]SofiaBulgaria29Support
SamLee[email protected]BusanSouth Korea37Engineer
GraceOkafor[email protected]LagosNigeria26Marketing
LeoFischer[email protected]ViennaAustria33QA
RaviKumar[email protected]ChennaiIndia31Engineer
ElenaPopescu[email protected]BucharestRomania27Designer
YukiTanaka[email protected]OsakaJapan35PM
← Previous Next →
{C}

Built with love by Kim Majali, EITO team, and contributors.