Themes

Built-in themes and flags for table appearance.

Apply a theme

Pass theme with light, dark, neutral, modern-light, or modern-dark. Use custom with Custom Theme for your own tokens.

React TSX
<SimpleTable
theme="modern-dark"
columns={columns}
rows={rows}
/>

Styling flags

Toggle row hover, zebra striping, and borders. hoverRowBackground and oddEvenRowBackground default to on; columnBorders and oddColumnBackground default to off.

React TSX
<SimpleTable
theme="light"
hoverRowBackground
oddEvenRowBackground
columnBorders
oddColumnBackground
columns={columns}
rows={rows}
/>

Column cell classes

Set cellClass on a ColumnDef to add a CSS class to every body cell in that column. Space-separated names work. Style with selectors like .amount-col.

React TSX
{
accessor: "amount",
label: "Amount",
width: 120,
type: "number",
cellClass: "amount-col",
}
/* CSS */
.amount-col { font-variant-numeric: tabular-nums; }

Conditional row classes

Use getRowClass to highlight rows by data (e.g. a search jump target). Classes apply to each body .st-cell — style with selectors like .jump-row.

React TSX
const [jumpId, setJumpId] = useState(null);
<SimpleTable
columns={columns}
rows={rows}
getRowClass={({ row }) =>
jumpId && row.id === jumpId ? "jump-row" : undefined
}
/>
/* CSS */
.jump-row { background-color: #fef3c7; }

Example

Switch themes below. Code or StackBlitz has the full example.

Light

Props

Theme Configuration

PropertyRequiredDescriptionExample
theme
Optional
Built-in theme for the table.
Options:
light
dark
neutral
modern-light
modern-dark
custom
hoverRowBackground
boolean
Optional
Highlight the row under the pointer. Defaults to true.
oddEvenRowBackground
boolean
Optional
Alternate row background colors. Defaults to true.
Optional
Return CSS class name(s) for a row. Applied to each body cell — style with `.st-cell.yourClass`.
oddColumnBackground
boolean
Optional
Alternate column background colors. Defaults to false.
columnBorders
boolean
Optional
Show vertical borders between columns. Defaults to false.