Skip to main content

Theme Tokens

Every color, font, and size SheetXL's UI reads, as a CSS variable. Set them with the tokens prop or in a stylesheet; Theme the Spreadsheet shows how, and how to aim one at a single mode or surface.

In CSS, each token is prefixed with --sxl-: color-primary is --sxl-color-primary. Any of them can be set per mode (light, dark) and per surface (app, header, grid).

Surfaces and text​

TokenMeaning
color-base-100Paper: the main background
color-base-200The backdrop around the grid; a subtle fill
color-base-300Gridlines and dividers
color-base-borderBorders between regions: the grid frame, the line under the headers, above the tabs
color-base-contentText on any base color
color-base-hoverA hovered row or button (keep it see-through, it sits on top of the paper)
color-base-selected / color-base-selected-contentA selected row or column header, list row, or tab, and its text
color-base-emphasis / color-base-emphasis-contentA fully selected row or column (select-all), and its text
color-input / color-input-borderText fields (the formula bar, the name box) and their border
color-elevated / color-elevated-borderPopups and menus, and an optional border for them

Colors​

TokenMeaning
color-primary / color-primary-contentSelection and interaction, and text on it
color-accent / color-accent-contentA second accent, and text on it
color-info / color-info-contentInformation
color-success / color-success-contentSuccess
color-warning / color-warning-contentWarning
color-error / color-error-contentError
color-neutralA muted grey for icons and quiet marks
color-shadowShadow color

Color lists​

These come as numbered variables. The count is fixed: you can change the colors, not how many there are.

TokenVariablesMeaning
color-series--sxl-color-series-1 … -7Distinct colors for things that need telling apart: cell references in a formula, and their outlines on the grid
color-bracket--sxl-color-bracket-1 … -3Matching bracket pairs in a formula, by how deeply they're nested

In the tokens prop, a list is an array: 'color-series': ['#1a73e8', '#d93025', …].

Type and shape​

TokenMeaning
font-familyThe chrome's font (not the cells' — see Fonts)
font-family-monoMonospace text, such as function signatures in tips
font-size / font-weight / font-styleThe chrome's text
radius-field / radius-boxCorner rounding for fields, and for boxes and panels
borderDefault border width
image-backgroundA faint wash behind pictures and charts in dark mode

Stacking (advanced)​

TokenMeaning
z-grid / z-popup / z-tooltipThe z-index bands for things anchored to the grid, popups and menus, and tooltips. Change these only if SheetXL's popups appear behind your own UI.