Skip to content

Table

Tables are full width with header, body and footer lines. Add a class for stripes, hover or a sticky header.

Plans
PlanProjectsPrice
Free3$0
ProUnlimited$12
TeamUnlimited$40
BilledMonthly

Cells use even digit widths, so number columns line up.

Striped

NameRole
AdaEngineer
GraceAdmiral
AlanMathematician
LinusMaintainer

Hover

.hover highlights the row under the pointer.

OrderStatus
#1042Shipped
#1043Packing
#1044Paid

Sticky header

.sticky keeps the header in view while the page scrolls. Inside a .table-responsive wrapper with a max height, it sticks to the wrapper instead.

ShadeVariable
50--i-color-blue-50
100--i-color-blue-100
200--i-color-blue-200
300--i-color-blue-300
400--i-color-blue-400
500--i-color-blue-500
600--i-color-blue-600

Sizes

.small, .medium and .large change the cell padding and font size.

SmallCompact rows
TableFor dense data
LargeRoomy rows

Responsive

Wrap a wide table in .table-responsive to scroll it sideways instead of the page. Keyboard users can only scroll it once it can take focus, so give it tabindex="0" and an aria-label.

MonTueWedThuFriSatSunTotal
1,204 visits1,388 visits1,512 visits1,470 visits1,290 visits860 visits790 visits8,514 visits

Variables

VariableDefault
--i-table-header-border-widthvar(--i-border-width)
--i-table-header-font-weight600
--i-table-color-bordervar(--i-color-subtle-border)
--i-table-header-color-backgroundvar(--i-color-background)
--i-table-row-striped-color-background#6f78870a
--i-table-row-hover-color-backgroundcolor-mix(in oklab, var(--i-color-text) 8%, transparent)