Skip to main content
  1. Docs
  2. Foundations
  3. 04 of 05

Elevation

Shadows for floating layers, ruled borders, the stacking order, opacity and the focus ring.

Shadows
5For floating layers only
Border widths
3Rules, not shadows
Layers
10One stacking order
Focus ring
2pxOn every control

01

Shadows

Floating layers only. Each pairs a tight contact shadow with a soft ambient one.

Lowest to highestEach name copies its --qx-shadow-* variable
WellsSunken into the page
inset · y 1 · blur 2inset · y 1 · blur 2
CardsAt rest. Hover to lift
y 1 · blur 3y 1 · blur 2
CardsUnder the pointer
y 8 · blur 16y 8 · blur 16
MenusPopover, Select, Toast
y 12 · blur 24y 12 · blur 24
DialogsDialog, Drawer
y 24 · blur 48y 24 · blur 48

02

Anatomy

Each shadow, layer by layer: a tight contact shadow, a soft ambient one, and a hairline edge.

Cards at rest
Contacty 1 · blur 2 · spread -1 · 8%
Ambienty 1 · blur 3 · 4%
Edgespread 1 · 3%
Togetherraised
Cards on hover
Contacty 2 · blur 4 · spread -2 · 8%
Ambienty 8 · blur 16 · spread -6 · 10%
Edgespread 1 · 3%
Togetherraised-hover
Menus and popovers
Contacty 4 · blur 8 · spread -4 · 8%
Ambienty 12 · blur 24 · spread -8 · 12%
Edgespread 1 · 5%
Togetheroverlay
Dialogs and drawers
Contacty 8 · blur 16 · spread -8 · 12%
Ambienty 24 · blur 48 · spread -12 · 20%
Edgespread 1 · 5%
Togethermodal

03

In both schemes

The same shadows on a light and a dark canvas. In dark, each layer is also a step lighter, so height reads by tone as well.

Light
raisedraised-hoveroverlaymodal
Dark
raisedraised-hoveroverlaymodal

04

Borders

Three widths: hairline rules, emphasis lines, and the accent bar on the current item.

1pxCards, fields, table rules
Acme Pvt Ltd48 members · 3 admins
2pxTab baselines, menu highlights
3pxAlerts, dialogs, the current item
Information: Directory sync paused
People added in Okta appear once it resumes.

05

Layers

From the top layer down. Popovers sit above modals, so one opened from a dialog shows.

All 10 layers in order: popovers above modals, tooltips above both, the skip link on top

  1. 1900SkipLink
  2. 1800Guided tours
  3. 1700Tooltip
  4. 1600ToastProvider
  5. 1500Popover, Menu, Select, Combobox
  6. 1400Dialog, Drawer, CommandPalette
  7. 1300Dialog and Drawer backdrops
  8. 1000No component yet
  9. 100Table header, AppShell
  10. 0Page content

06

Opacity

One opacity, for content with no disabled colour of its own, and the state layers.

Opacity
At rest100%
Disabled40%
State layersLight · dark
Hover6% · 8%
Pressed12% · 14%
Scrim40% · 62%
Priya Sharma
Selection20%

07

Focus ring

2px in the focus colour: inside the edge of filled controls, 2px outside small ones.

Inside the edgeButtons, fields, tabs
2px
Outside the edgeCheckboxes, links, switches
2px
2px
View the audit log

08

In code

Rules first; a shadow only when something floats. Qeetrix's components set all of this for you.

members.css
/* A card: ruled, no shadow until it lifts. */
.member-card {
  border: var(--qx-border-width-default) solid var(--qx-color-border-subtle);
  border-radius: var(--qx-radius-surface);
  background: var(--qx-color-surface-raised);
}

.member-card:hover {
  box-shadow: var(--qx-shadow-raised-hover);
}

/* A menu floats: its own layer, its own shadow. */
.row-menu {
  position: absolute;
  z-index: var(--qx-z-popover);
  border-radius: var(--qx-radius-overlay);
  background: var(--qx-color-surface-overlay);
  box-shadow: var(--qx-shadow-overlay);
}

.row-menu-item:focus-visible {
  outline: var(--qx-focus-ring-width) solid var(--qx-color-border-focus);
  outline-offset: calc(-1 * var(--qx-focus-ring-width));
}
Next — 05 of 05Motion