Theme scope and reuse
Audience: CMS editors and theme developers.
A Theme defines brand identity. Its two ColorVariant relationships supply the colors for light and dark appearance. Each variant contains named surfaces. A surface supplies the complete color settings for one placement.
Three separate choices
| Choice | What it controls | Example |
|---|---|---|
| Theme appearance | Which ColorVariant is active. | lightColorVariant or darkColorVariant. |
| Placement surface | Background, normal and muted text, interactions, native controls, and artwork choice. | theme-page, theme-brand, or a custom Tag. |
| Artwork | Which file to use on the selected surface. | default or onDark. |
The words light and dark identify appearance choices. They do not describe every background in that configuration.
A light appearance can have a dark Brand surface with light text and onDark artwork.
The application uses the declared values. It does not infer colors from brightness or logo availability.
Both Theme relationships are required. They can select the same ColorVariant if both appearances must use the same colors. Fonts, button shape, logo, and favicon stay on the same Theme in both appearances.
Surface selection in each appearance
Components select a surface key or an ordered list of keys.
For each appearance, the renderer uses the first key that exists in that ColorVariant.
If none of the requested keys exists, it uses that variant’s required theme-page surface.
For example, neutral navigation glass requests theme-quicklinks, then theme-navigation, then theme-panel.
The light variant can use Quicklinks while the dark variant uses Navigation.
The renderer does not take a missing dark surface from the light variant.
The selected surface supplies the complete settings together. Its text color does not come from a different role. If that surface has an action override, filled actions use the complete override. Otherwise, they use the selected ColorVariant’s shared action style. They do not use the action override of the next candidate or an outer surface.
See surface keys and placement priorities for the exact key names and component assignments.
Section inheritance
The ordered page banner list starts on theme-page.
A SectionMarker selects a surface Tag for the content that follows it, until the next marker or the end of the list.
The marker has no visible heading or text on the public page.
The Tag resolves within the current Theme and appearance.
A shared theme-campaign marker can therefore use different colors on pages with different Themes.
If a variant does not define that key, the section uses its Page surface.
Ordinary banner content inherits its section.
Hero slides follow an active marker’s Tag, including theme-page.
Before any active marker, they request theme-hero, then theme-brand, then Page.
The implicit Page start does not override this default. Unset or inactive markers do not change it.
Each slide resolves the requested role in its own Theme and independently in each appearance.
If a marker’s role is absent there, the slide uses Page.
Functional cards and dialogs keep their explicit Panel placement.
Input controls prefer the optional Inputs role before their existing Panel or inherited section selection. Controls that previously inherited their section still follow its markers when Inputs is absent.
Markers apply to the top-level banner list; a marker inside a nested banner does not start another section.
The CMS start group shows inherit theme-page.
Template banners before the page content also start on Page.
Template banners after the page content continue the preceding section, so their label is inherit.
See ordered relationships for the editor controls.
Input control placement
The optional theme-inputs surface lets a Theme give public inputs their own
complete color settings. Editors create the Tag and surfaces only in the
ColorVariants that need them. It is not a core Tag and adds no required field.
An input first requests theme-inputs, then its previous selection. For a
Panel control, the order is theme-inputs, then theme-panel. For a control
that inherited a section’s ordered selection, the whole previous list follows
theme-inputs. Each appearance resolves that order separately. Missing Inputs
therefore keeps that control’s previous colors.
In code, inheritSurface appends the complete parent selection after the
requested roles. Each appearance then resolves the combined order:
<Surface name={[ThemePlacementSurfaceKey.Inputs]} inheritSurface>
{children}
</Surface>The parent list stays intact, even when light and dark use different entries. Nested controls that request the list’s leading roles reuse that order without adding the same prefix again.
Inheritance is opt-in. An explicit list without inheritSurface keeps its own
order and does not append section roles:
<Surface name={[ThemePlacementSurfaceKey.Inputs, ThemeSurfaceKey.Panel]}>
{children}
</Surface>ThemeScopeProvider uses the same option with its surface prop.
A Theme-only scope does not declare a surface. It stays transparent and keeps
the parent selection and native control scheme, even with inheritSurface.
Custom dropdowns keep the same Theme for the trigger and menu. The trigger
uses the Inputs selection; the open panel uses theme-panel, or Page if Panel is absent.
The selected surface supplies normal and muted text, borders, focus, native
controls, and interaction colors together. Selected controls use its complete
ActionStyle override or the ColorVariant’s shared style.
Only the painted control uses this pair. The form and dialog keep their own surfaces. Checkbox and radio labels, and hints outside the painted control, keep their surrounding section’s colors. Action buttons, CTAs, and fixed CMS or admin palettes do not change to the Inputs role.
Actions and muted text
A surface has explicit normal and muted text colors. Muted text is secondary information that must remain readable. It is not the disabled state. The renderer does not produce muted text by reducing the normal text opacity.
Filled actions need a separate fill and label pair because they paint their own background. Each ColorVariant has a complete shared ActionStyle. A surface can select a separate complete ActionStyle as an override. Outlined actions and text links use the interaction colors of their surrounding surface. Error, success, and warning messages use the variant’s explicit status pairs. There is no global accent or emphasis color to mix into these pairs.
The preview at /admin/buttons shows normal and muted contrast, action states, and the selected surface and action sources.
It reports problems without changing authored colors.
Artwork, media, and glass
The surface’s artwork setting requests default or onDark image files for artwork that inherits its placement.
An alternate onDarkFile is optional. If it is absent, the default file is used.
Editors must check that the supplied artwork works on the intended backgrounds.
See the Image reference for desktop and mobile source order.
Media gradients and glass blur are rendering treatments, not extra surface keys. They use the pair selected for their placement. Hero text sits over the image gradient without a separate text background. Hero photographs explicitly use default artwork. Glass uses translucency, so editors must also inspect text over the content behind it.
Shared Theme records
A Theme is a shared CMS record. Multiple pages or components can refer to it. ColorVariants, ThemeSurfaces, Tags, and ActionStyles can also be shared. Changing a shared record affects every configuration that uses it.
Pages use Page.theme. Headers, footers, and hero slides can select a local Theme.
That local Theme supplies the identity and ColorVariants for that component’s surface selection.
Changing a Theme relationship on one target does not change the shared Theme itself.
The Theme Surface sidebar action Fläche duplizieren copies the saved surface values into a new record.
It keeps the same Tag and optional ActionStyle references. It does not assign the copy to a ColorVariant.
Select the intended Tag and variant assignment before using the copy.
Controls outside the visible section
Dropdowns and dialogs retain the Theme of the control that opened them, including both appearance variants.
An open selection panel uses theme-panel in that Theme. A dialog panel keeps
its own explicit surface; opening it does not make the entire dialog an Inputs
surface.
Layer rules control stacking; theme scope controls identity and colors.
Use configure theme surfaces to create the records and Tags. Use apply a theme to change a target’s Theme relationship, or interface layers for stacking behavior.