Skip to main content
Full createTheme() API reference and CSS variable catalog. Start with the theming overview if you’re new to theming.

createTheme() options

Start with colors only. Use vars when a specific component needs to look different.

Dark theme example

Raw CSS alternative

You can also write CSS directly. Apply overrides to <html>.

Variable reference

Semantic (UI-wide)

These cascade to every component. Changing one updates the entire UI.

Toolbar

Toolbar dropdowns (font picker, style picker) and the overflow menu.

Context menu

The right-click menu.

Tooltip

Comments

Card styling, typography, and input elements for the comments sidebar. Card: Text: Input: Status: Filter dropdown: Visibility badges:

Comment highlights (in-document)

Colors applied to highlighted text when comments are present. These are document-level, not UI chrome.

Tracked changes

Insert, delete, and format change decorations in the document. Word-style redlines can be approximated with CSS vars only:
If you also want tracked-change text inside comment threads to match, set --sd-ui-comments-insert-text and --sd-ui-comments-delete-text too.

Content controls

DOCX content controls (SDTs): form fields, dropdowns, date pickers.

Layout

Page appearance in presentation mode.

Tools

The floating action toolbar for AI and insert actions.

Surfaces

Dialog and floating overlays rendered above document content. Style with CSS variables: the stable classes .sd-surface-dialog and .sd-surface-floating are also available for stylesheet targeting.

Find and replace

The built-in find/replace popover inherits the shared surface tokens above and adds its own control-level variables.

Search highlights

Colors used for search result highlights inside the document view.

Password prompt

The built-in password dialog for encrypted DOCX files. All variables default to the shared UI tokens.

Source files

Token definitions live in your node_modules/superdoc/ package:
  • src/assets/styles/helpers/variables.css: defaults
  • src/assets/styles/helpers/themes.css: preset themes
  • src/assets/styles/helpers/compat.css: aliases for old names that map to a different concept