Theming Token reference

Token reference

The 24-token --pretable-* surface, with shape, default, and purpose for each.

Pretable's public theming surface is 24 CSS variables, all --pretable-* prefixed. Each theme defines all 24 at :root. Excel and Material 3 ship preset values; consumers override individual tokens at :root in their own stylesheet (see Override tokens).

Two tokens — --pretable-row-height and --pretable-header-height — are read by the engine in JavaScript via the useResolvedHeights hook. The other 22 are CSS-only.

Surfaces (5)

TokenDescriptionTypeExcelMaterial 3 (light)
--pretable-bg-gridBody cell backgroundcolor#ffffff#fef7ff (surface)
--pretable-bg-grid-altAlternate (zebra) row background; equal to bg-grid if no zebra desiredcolor#ffffff#fef7ff
--pretable-bg-headerHeader row background; pinned cells reuse thiscolor#f3f3f3#f3edf7 (surface-container)
--pretable-bg-toolbarToolbar + status/pagination bar backgroundcolor#f3f3f3#f3edf7
--pretable-bg-tooltipTooltip / column menu / filter popover backgroundcolor#ffffff#f3edf7

Text (3)

TokenDescriptionTypeExcelMaterial 3 (light)
--pretable-text-cellBody cell text colorcolor#1f1f1f#1d1b20 (on-surface)
--pretable-text-headerHeader text colorcolor#5c5c5c#49454f (on-surface-variant)
--pretable-text-dimSecondary text (toolbar labels, empty-state body, status text)color#5c5c5c#49454f

Lines (3)

TokenDescriptionTypeExcelMaterial 3 (light)
--pretable-ruleGridline color (between cells)color#d4d4d4#cac4d0 (outline-variant)
--pretable-rule-strongContainer outer edge + header bottom bordercolor#a6a6a6#79747e (outline)
--pretable-radiusContainer border radiuslength012px (M3 medium shape scale)

State (4)

TokenDescriptionTypeExcelMaterial 3 (light)
--pretable-bg-hoverRow hover backgroundcolortransparent (no hover)rgba(29, 27, 32, 0.08) (on-surface @ 8%)
--pretable-bg-selectedSelected cell/row backgroundcolorrgba(16, 124, 65, 0.10)#e8def8 (secondary-container)
--pretable-text-selectedSelected cell/row text colorcolor#1f1f1f#1d192b (on-secondary-container)
--pretable-focus-ringFocus outline color (cell focus, kbd nav)color#107c41 (Excel green)#6750a4 (primary)

Accent (1)

TokenDescriptionTypeExcelMaterial 3 (light)
--pretable-accentSort indicator, active filter tag, focus highlights, drag indicatorscolor#107c41#6750a4 (primary)

Density (6)

The first two are read by the engine in JavaScript. The other four are CSS-only.

TokenDescriptionTypeExcelMaterial 3 (standard)Engine reads?
--pretable-row-heightBody row heightlength20px48pxyes
--pretable-header-heightHeader row heightlength24px52pxyes
--pretable-cell-padding-xBody cell horizontal paddinglength6px16px
--pretable-cell-padding-yBody cell vertical paddinglength2px12px
--pretable-font-size-cellBody cell font sizelength15px14px
--pretable-font-size-headerHeader font sizelength13px14px

Density tokens vary by tier. The values shown above are each theme's natural default (:root). When [data-density="..."] is set on <html>, the corresponding override block adjusts these tokens — see Density switching.

Typography (2)

TokenDescriptionTypeExcelMaterial 3
--pretable-font-sansPrimary sans-serif family stackfont"Aptos Narrow", "Aptos", "Segoe UI", -apple-system, …"Roboto Flex", "Roboto", system-ui, …
--pretable-font-monoMonospace family stack (numeric cells, code)fontui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace"Roboto Mono", ui-monospace, monospace

Stability

@pretable/ui is at version 0.0.x. Token names may rename or remove in any patch release. Each release's CHANGELOG.md describes the deltas. Override at your own risk; the contract solidifies post-1.0.

Where to go next