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.
Add the class table to the table element to get the default style.
| Firstname | Lastname | |
|---|---|---|
| John | Doe | [email protected] |
| Kim | Doe | [email protected] |
| Dan | Doe | [email protected] |
Add the classes table table-striped.
| Firstname | Lastname | |
|---|---|---|
| John | Doe | [email protected] |
| Kim | Doe | [email protected] |
| Dan | Doe | [email protected] |
Add the classes table table-striped-color-1.
| Firstname | Lastname | |
|---|---|---|
| John | Doe | [email protected] |
| Kim | Doe | [email protected] |
| Dan | Doe | [email protected] |
Add the classes table table-hover.
| Firstname | Lastname | |
|---|---|---|
| John | Doe | [email protected] |
| Kim | Doe | [email protected] |
| Dan | Doe | [email protected] |
Add the classes table table-hover-color-1.
| Firstname | Lastname | |
|---|---|---|
| John | Doe | [email protected] |
| Kim | Doe | [email protected] |
| Dan | Doe | [email protected] |
Add the classes table table-bordered.
| Firstname | Lastname | |
|---|---|---|
| John | Doe | [email protected] |
| Kim | Doe | [email protected] |
| Dan | Doe | [email protected] |
Add the classes table table-bordered-color-1.
| Firstname | Lastname | |
|---|---|---|
| John | Doe | [email protected] |
| Kim | Doe | [email protected] |
| Dan | Doe | [email protected] |
Add the class table table-cell-separate (or table-cell-separate-color-1), optionally with table-cell-border-none.
| Firstname | Lastname | |
|---|---|---|
| John | Doe | [email protected] |
| Kim | Doe | [email protected] |
| Dan | Doe | [email protected] |
| Firstname | Lastname | |
|---|---|---|
| John | Doe | [email protected] |
| Kim | Doe | [email protected] |
| Dan | Doe | [email protected] |
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.
| Month | Leads | Sales |
|---|---|---|
| January | 100 | 50 |
| February | 200 | 100 |
| Sum | 300 | 150 |
| Month | Leads | Sales |
|---|---|---|
| January | 100 | 50 |
| February | 200 | 100 |
| Sum | 300 | 150 |
Add table-compact, or table-large-2x through table-large-5x, to control row height.
| Firstname | Lastname | City | Country | Age | |
|---|---|---|---|---|---|
| John | Doe | [email protected] | Montreal | Canada | 30 |
| Kim | Doe | [email protected] | Kharkov | Ukraine | 25 |
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.
| Firstname | Lastname | City | Country | Age | |
|---|---|---|---|---|---|
John 2nd line 3rd line |
Doe |
Montreal |
Canada |
30 |
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.
| Firstname | Lastname | City | Country | Age | |
|---|---|---|---|---|---|
| John | Doe | [email protected] | Montreal | Canada | 30 |
| Kim | Doe | [email protected] | Kharkov | Ukraine | 25 |
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.
| Month | Leads | Sales |
|---|---|---|
| January | 120 | 60 |
| February | 180 | 90 |
| March | 200 | 110 |
| April | 160 | 80 |
| May | 220 | 120 |
| June | 240 | 130 |
| July | 210 | 100 |
| August | 230 | 115 |
| September | 190 | 95 |
| October | 250 | 135 |
| November | 260 | 140 |
| December | 300 | 160 |
| Firstname | Lastname | |
|---|---|---|
| John | Doe | [email protected] |
| Kim | Doe | [email protected] |
| Dan | Doe | [email protected] |
| Alex | Reyes | [email protected] |
| Priya | Shah | [email protected] |
| Marco | Rossi | [email protected] |
| Nina | Petrov | [email protected] |
| Sam | Lee | [email protected] |
| Grace | Okafor | [email protected] |
| Leo | Fischer | [email protected] |
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 | City | Country | Age | Role | |
|---|---|---|---|---|---|---|
| John | Doe | [email protected] | Montreal | Canada | 30 | Engineer |
| Kim | Doe | [email protected] | Kharkov | Ukraine | 25 | Designer |
| Alex | Reyes | [email protected] | Austin | USA | 34 | PM |
| Priya | Shah | [email protected] | Pune | India | 28 | Analyst |
| Marco | Rossi | [email protected] | Milan | Italy | 41 | Sales |
| Nina | Petrov | [email protected] | Sofia | Bulgaria | 29 | Support |
| Sam | Lee | [email protected] | Busan | South Korea | 37 | Engineer |
| Grace | Okafor | [email protected] | Lagos | Nigeria | 26 | Marketing |
| Leo | Fischer | [email protected] | Vienna | Austria | 33 | QA |
| Ravi | Kumar | [email protected] | Chennai | India | 31 | Engineer |
| Elena | Popescu | [email protected] | Bucharest | Romania | 27 | Designer |
| Yuki | Tanaka | [email protected] | Osaka | Japan | 35 | PM |
Built with love by Kim Majali, EITO team, and contributors.