Skip to Content
ReferenceShared typesTheme surfaces

Theme surfaces

Audience: CMS editors, integrators, and developers.

ThemeSurface defines the complete color treatment of a placement. It supplies background, text, muted text, interaction states, native controls, and artwork selection together. A ColorVariant connects its available surfaces through one many relation.

Record and role

id●
string
required

CMS record identifier.

name●
string
required

Required display name. Components do not use it to select the surface.

userId●
string
required

CMS owner identifier, set during creation and preserved during updates. It is not part of the public ThemeSurface payload.

key●
Tag
required

Shared Tag that identifies the role. Its exact name becomes the key in the public surfaces map and the name requested by components or section markers.

Different variants can connect different ThemeSurface records with the same Tag. Each variant can connect only one surface for that Tag. Use the theme- prefix for surface role names. This is a naming convention; the Tag schema does not add or validate the prefix.

Core role keys

ThemeSurfaceKey exports these exact names from @haendlerapp/types. Project settings initialization creates the three Tag records if they are missing. It does not create ThemeSurface colors or ColorVariants.

Enum memberTag nameRequired surface in each variantUse
ThemeSurfaceKey.Pagetheme-pageYesBase page and final selection when requested keys are absent.
ThemeSurfaceKey.Brandtheme-brandNoBrand placements and the default for several prominent components.
ThemeSurfaceKey.Paneltheme-panelNoPanels, dialogs, and native control placements.

The CMS prevents renaming or deleting these three core Tags. The existence of a core Tag does not mean that its surface has been authored. Only the Page surface is required.

Optional placement keys

ThemePlacementSurfaceKey exports these optional names. Editors create the Tags and connect matching surfaces only when they need a separate palette. Project settings initialization does not create these Tags or surfaces.

Enum memberTag nameComponent selection order
ThemePlacementSurfaceKey.Footertheme-footertheme-footer, then theme-brand.
ThemePlacementSurfaceKey.Herotheme-heroActive section marker’s Tag; otherwise theme-hero, then theme-brand.
ThemePlacementSurfaceKey.Inputstheme-inputstheme-inputs, then the control’s existing Panel or inherited surface selection.
ThemePlacementSurfaceKey.Navigationtheme-navigationtheme-navigation, then theme-brand.
ThemePlacementSurfaceKey.QuickLinkstheme-quicklinkstheme-quicklinks, then theme-navigation, then theme-brand with tint enabled or theme-panel with tint disabled.

Each order ends at the selected variant’s Page surface if none of its keys exists. One appearance can use an optional role while the other uses a later key. Components retain their layout and rendering effects.

For Inputs, the previous selection stays complete. A control that selected Panel requests theme-inputs, then theme-panel. A control that inherited an ordered section selection keeps that entire list after theme-inputs. Missing Inputs uses the control’s previous selection in each appearance.

Inputs applies only to visible public input controls. Custom dropdown triggers use Inputs; their open selection panels use theme-panel in the same Theme, or Page if Panel is absent. Inputs does not recolor an entire form or dialog. Checkbox and radio labels, and hints outside a painted control, keep their ambient colors. Selected controls use the chosen surface’s complete ActionStyle override or the variant’s shared style. CTA buttons and fixed CMS or admin palettes keep their existing rules.

Custom names such as theme-campaign are also valid. Section markers select their Tag within the current Theme. A missing custom role uses Page. Hero slides follow an active marker, including an explicit Page marker. Before any active marker, they keep the Hero priority order above. Each slide resolves the role in its own Theme’s light and dark variants independently. An optional Tag cannot be deleted while a surface or section marker references it. If you rename a placement Tag, its name must still match the component’s requested key to select that placement.

Base colors

All color properties are required strings. The CMS color input accepts CSS colors, including hex and OKLCH, and stores the supplied string. For example, #ffffff and oklch(98% 0.01 250) are both valid color values.

background●
string
required

Background for this placement.

text●
string
required

Main text on this background.

mutedText●
string
required

Secondary text on this background. This is an explicit color, not an opacity applied to the main text.

Interaction colors

Each field below is a required color string.

FieldMeaning
borderSurface and control border.
focusFocus indicator.
hoverBackgroundBackground of a surface interaction in its hover state.
hoverTextText on the hover background.
pressedBackgroundBackground of a pressed surface interaction.
pressedTextText on the pressed background.
outlineTextLabel of an outlined action on this surface.
linkTextLink text on this surface.
linkHoverTextLink text in its hover state.

Filled actions use their selected ActionStyle. They do not combine their fill with the surrounding surface’s text color.

Artwork and native controls

artwork●
'default' | 'onDark'
required

Image artwork to use on this surface. This choice is independent of the Theme's light or dark appearance.

colorScheme●
'light' | 'dark'
required

Native browser control appearance for this surface, such as checkboxes. It does not select the ColorVariant, text color, or artwork.

onDark image files remain optional. When the requested file is absent, the default file is used. Editors are responsible for making that default suitable for both placements. See image types.

Action override

actionStyle●

Optional complete action style for this surface. Null or an omitted public value uses the ColorVariant's shared ActionStyle.

The override replaces the complete shared style. Colors are not merged field by field. A nested surface selects its own override or the variant’s shared style; it does not inherit the parent surface’s override.

The CMS prevents deletion of a Page surface that a ColorVariant uses. Optional surfaces can be disconnected or deleted. Their placements then use the next requested key, or Page.

Last updated on