The four layers are not an app-wide setting. You pick CSS, wireframes, primitives, or headless per feature and per surface, then layer CSS on top of everything for theming. Most real apps mix two or more, and different features landing on different layers is normal and correct.
Use it when different features need different layers, which is the usual case. Run the decision tree on each feature; its worked examples show what a given design intent usually lands on. If one surface genuinely needs a single layer, go straight to that layer’s page: CSS, Wireframes, Primitives, or Headless.
Mixing is also the UI Customization Plugin’s default: it picks the cheapest workable layer per surface, exactly like the decision tree.
The rules
One constraint governs mixing:
Use one <VeltWireframe> registry in the whole app. It can hold as many feature wireframes as you like. Multiple registries merge first-with-content-wins, which is order-dependent and conflict-prone.
Beyond that, the layers compose freely:
- CSS composes with everything.
--velt-* variables apply globally, so theming sits on top of any other layer.
- Different surfaces can use different layers. A wireframed dialog and a plain primitive sidebar don’t interfere.
- The same surface can use more than one layer. You can render a
VeltCommentDialog primitive and wireframe a single piece of that same dialog. Leaf pieces have no sub-components, so their wireframe is the only way to restructure them, which makes this combination necessary rather than exotic.
Mixing doesn’t suspend each layer’s own rules: wireframe interactivity limits and headless cost still apply. Picking a layer more expensive than the design needs is the one real mistake here, and the escalation signs tell you when you’ve done it.
Common combinations
A concrete mixed setup
Dialog = wireframe, sidebar = primitive, badge = headless, all themed with CSS, one <VeltWireframe>.
React / Next.js
Other Frameworks
In React, VeltCustomization is your own wrapper component: the single file that holds your <VeltWireframe> registry and CSS import, per the recommended folder structure.
What it can and can’t do
Checklist