Elevation
Elevation communicates spatial relationships between UI elements. Tessera UI uses box-shadows for depth and a z-index scale for stacking order.
Shadow Scale
Section titled “Shadow Scale”Five elevation levels provide a clear visual hierarchy from flat to floating. Hover to see each card lift.
Elevation Transitions
Section titled “Elevation Transitions”Cards move up one elevation level on hover. Try hovering these cards.
Inset Shadows
Section titled “Inset Shadows”Inset shadows create the impression of recessed surfaces — input fields, toggle tracks, and pressed states.
Dark Mode Elevation
Section titled “Dark Mode Elevation”In dark mode, box-shadows become less effective because the base surface is already dark. Tessera UI compensates with elevation tint tokens — progressively lighter surface colors that differentiate layers.
In light mode all three levels map to white (neutral-0) because shadows alone provide sufficient separation. In dark mode each step adds a subtle cool blue tint aligned with the M3 surface elevation model.
/* Card at rest */background-color: var(--ts-color-bg-elevated-1);box-shadow: var(--ts-shadow-sm);
/* Card on hover */background-color: var(--ts-color-bg-elevated-2);box-shadow: var(--ts-shadow-md);Layering Model
Section titled “Layering Model”Elements at rest occupy different conceptual layers. Each layer uses a specific elevation range.
Z-Index Scale
Section titled “Z-Index Scale”A fixed z-index scale prevents stacking conflicts across components.
Guidelines
Section titled “Guidelines”- Use elevation sparingly. Not every container needs a shadow. Flat layouts with borders are often cleaner for dense UIs.
- One elevation increase per interaction. Hover effects should move up one level, not jump from none to
xl. - Pair elevation with borders in dark mode. Shadows are less visible on dark backgrounds — add a subtle
--ts-color-border-subtleborder for clarity. - Reserve
xlfor modals and critical overlays. Overuse of high elevation diminishes its impact.