Table Static Examples
CSS-only table features including sticky headers, columns, density variants, and row states.
Sticky Header
The header row stays fixed while scrolling vertically. Uses data-sticky="header".
Sticky Column
The first column stays fixed while scrolling horizontally. Uses data-sticky="column".
Sticky Header and Column
Both the header row and first column stay fixed. The corner cell remains visible at all scroll positions. Uses data-sticky="both".
Sticky 2 Columns
The first two columns stay fixed while scrolling horizontally. Uses data-sticky-column="2".
Density Variants
Adjust table padding for different use cases with data-density.
Compact
Compact density
| Name |
Role |
| Alice Chen |
Engineer |
| Bob Martinez |
Designer |
| Carol Johnson |
Manager |
Comfortable
Comfortable density
| Name |
Role |
| Alice Chen |
Engineer |
| Bob Martinez |
Designer |
| Carol Johnson |
Manager |
Row States
Visual states for table rows including selected, disabled, and highlighted.