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
CMS record identifier.
Required display name. Components do not use it to select the surface.
CMS owner identifier, set during creation and preserved during updates. It is not part of the public ThemeSurface payload.
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 member | Tag name | Required surface in each variant | Use |
|---|---|---|---|
ThemeSurfaceKey.Page | theme-page | Yes | Base page and final selection when requested keys are absent. |
ThemeSurfaceKey.Brand | theme-brand | No | Brand placements and the default for several prominent components. |
ThemeSurfaceKey.Panel | theme-panel | No | Panels, 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 member | Tag name | Component selection order |
|---|---|---|
ThemePlacementSurfaceKey.Footer | theme-footer | theme-footer, then theme-brand. |
ThemePlacementSurfaceKey.Hero | theme-hero | Active section marker’s Tag; otherwise theme-hero, then theme-brand. |
ThemePlacementSurfaceKey.Inputs | theme-inputs | theme-inputs, then the control’s existing Panel or inherited surface selection. |
ThemePlacementSurfaceKey.Navigation | theme-navigation | theme-navigation, then theme-brand. |
ThemePlacementSurfaceKey.QuickLinks | theme-quicklinks | theme-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 for this placement.
Main text on this background.
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.
| Field | Meaning |
|---|---|
border | Surface and control border. |
focus | Focus indicator. |
hoverBackground | Background of a surface interaction in its hover state. |
hoverText | Text on the hover background. |
pressedBackground | Background of a pressed surface interaction. |
pressedText | Text on the pressed background. |
outlineText | Label of an outlined action on this surface. |
linkText | Link text on this surface. |
linkHoverText | Link 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
Image artwork to use on this surface. This choice is independent of the Theme's light or dark appearance.
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
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.