Skip to content

Theme Properties

This page lists all available CSS variables you can customize through the theme prop.

PropertyDescriptionDefault
--mondrian-border-primaryMain border color#d1d5db
--mondrian-border-separatorSeparator lines#ccc
PropertyDescriptionDefault
--mondrian-bg-whiteWhite background#ffffff
--mondrian-bg-gray-100Light gray background#f3f4f6
--mondrian-bg-gray-200Medium gray background#e5e7eb
PropertyDescriptionDefault
--mondrian-text-blackPrimary text#000000
--mondrian-text-gray-400Light gray text#888
--mondrian-text-gray-500Medium gray text#6b7280
--mondrian-text-gray-700Dark gray text#374151
PropertyDescriptionDefault
--mondrian-syntax-prefixFormula prefix#aaa
--mondrian-syntax-rangeCell range references#f7981d
--mondrian-syntax-numberNumbers and booleans#1155cc
--mondrian-syntax-stringString literals#1a7f37
PropertyDescriptionDefault
--mondrian-highlight-strokeSelected cell border#217346
--mondrian-highlight-fillSelected cell background#c6efce
--mondrian-resizer-hoverColumn/row resize hoverrgba(0, 0, 0, 0.1)
PropertyDescriptionDefault
--mondrian-error-redError messages#dc2626
PropertyDescriptionDefault
--mondrian-border-radiusMain border radius8px
--mondrian-border-radius-smSmall border radius4px

Pass any of these properties in the theme prop:

<SpreadsheetViewer
model={model}
theme={{
'--mondrian-highlight-stroke': '#3b82f6',
'--mondrian-highlight-fill': '#dbeafe',
'--mondrian-border-radius': '12px',
}}
/>

For examples and common theme configurations, see the Theming Guide.