On this page
Build a Design System Elevation Model with Consistent Shadow Roles is most useful when it becomes a repeatable operating practice rather than an isolated cleanup. Consider a library team standardizing visual depth across menus, dialogs, and surfaces. The team needs a clear contract, an owner, and evidence that the result works for consumers. This guide turns elevation role contracts into a bounded workflow with decisions you can record and revisit.
Separate visual depth from stacking order
Visual elevation communicates separation or hierarchy; stacking order determines paint relationships. A large shadow does not place a menu above a dialog, and a high z-index does not guarantee that it escapes a stacking context. Document these as related but separate system concerns. Start with actual layers in your product, such as base surfaces, raised panels, floating controls, and blocking overlays.
Use the Box Shadow Generator to prototype a layered recipe on a representative surface. Adjust offsets, blur, spread, and opacity, then copy the CSS into your component fixture. Judge it in context rather than approving the isolated preview as the final system-wide treatment.
Set a bounded pilot before changing the whole library. Choose one supported consumer, name the reviewer, and write the acceptance condition in observable terms. Keep the initial scope small enough that the same people can review both the proposal and the resulting implementation.
Define a small set of elevation roles
Contract review. Choose names that communicate use rather than arbitrary prestige. A role such as overlay surface is easier to apply than a number whose meaning nobody remembers. Keep the number of public roles small enough for consumers to choose predictably. State which component families own each role and which surfaces deliberately remain flat. Do not force every card or grouping to appear raised simply because the system has a shadow scale.
For a portable review record, start with explicit fields rather than a paragraph hidden in chat:
{
"role": "floating-surface",
"shadowLayers": 2,
"borderFallback": true,
"stackingPolicy": "separate",
"owner": "visual-foundations"
}This is an illustrative project record, not an industry interchange format. Add stable identifiers and private source references in your own tracker when they help maintainers verify the evidence.
Specify shadows as theme-aware recipes
Implementation evidence. A shadow recipe can include multiple layers, a border, and a surface treatment. Record the full recipe rather than only the blur radius. Use theme-specific values where necessary because a dark shadow on a dark background may communicate little separation. Document whether high-contrast or forced-color environments need borders or other cues. The contract should describe the intended distinction, not depend on one visual mechanism surviving every environment.
Consult MDN custom properties guide for the underlying platform or workflow details. Verify the version and capabilities your team actually uses. External guidance establishes technical behavior; your own documentation must still explain which subset the shared system supports and who approves changes to it.
Test clipping and surrounding surfaces
Consumer validation. Place examples inside scrolling containers, clipped regions, transformed ancestors, and adjacent surfaces. Check focus indicators as well as shadows, because an overflow rule can clip both. Test overlay positioning separately from shadow appearance. Avoid fixing a local clipping issue by increasing blur or z-index without understanding the containing context. Record the expected placement boundary and whether the component uses a portal or another overlay strategy.
Use WCAG 2.2 as a reference for the relevant standards or tooling, not as a substitute for checking your implementation. Record at least one ordinary case and one boundary case. When a result differs from the contract, identify whether the specification, example, or implementation should change before approving the work.
Publish ownership and exception rules
Maintenance ownership. Keep elevation choices inside the shared component when they are part of its contract, while allowing deliberate composition-level choices for generic surfaces. Require exceptions to explain why an existing role fails. Compare proposed changes across several component families before updating a widely used recipe. Publish meaningful visual changes with examples and note any surface or border adjustments that must accompany the new shadow values.
Keep the review artifact beside the work it governs. Storybook documentation can support the documentation or implementation process, while Design Systems guides provide broader operating context. Use the development directory for adjacent implementation resources. Revisit the decision when a supported consumer exposes a concrete limitation, not merely because a new naming preference appears.
Review one floating-surface recipe in context
Start a menu prototype with two shadow layers: a short, relatively sharp contact layer and a wider, lower-opacity ambient layer. For example, try a 2-pixel vertical offset with a 4-pixel blur for contact, then an 8-pixel offset with a 24-pixel blur for ambient separation. Treat these as test inputs, not prescribed production values. Compare the menu on a plain canvas, a raised panel, and a photograph; the same recipe may be clear in one context and muddy in another.
Record the surface fill and border with the shadow. Changing only opacity can fail when the surrounding background is nearly the same tone. In a dark scheme, a subtle boundary or lighter surface may convey separation more reliably than a stronger black shadow. In forced-color environments, verify an explicit boundary using supported system colors rather than assuming the shadow survives. Do not suppress user color settings just to preserve the original effect.
Check the focus ring on the first and last menu items. It must remain distinguishable from the surface boundary, and neither ring nor shadow should obscure nearby content. The component fixture should show the menu open at a viewport edge, where positioning adjustments and available space can expose problems hidden by a centered preview.
Triage a menu that appears underneath content
First inspect whether an ancestor creates a stacking context, for example through a transform. A child with a very large z-index still participates within that ancestor's stacking position. Next inspect clipping: an ancestor with overflow clipping can cut off the shadow regardless of the child's z-index. These are separate failure modes and need separate fixes.
Use the system's documented overlay container or portal strategy when appropriate, then retest theme inheritance and positioning. Moving a menu elsewhere in the document can solve clipping while introducing a missing theme scope. Keep a regression fixture for the original composition and record which layer owns the solution. A new elevation token should not be required to compensate for an overlay placement defect.
Key takeaways
- Define the scope and owner of elevation role contracts before implementation.
- Start with a representative consumer and explicit acceptance evidence.
- Separate policy decisions from what a formatter, generator, or test can prove.
- Review boundary cases and document intentional exceptions.
- Keep the supported contract, examples, and release guidance aligned.
Reach designers & developers at work
Put your product next to the tools people use every day. One sponsor per placement, no tracking pixels.
Become a sponsor