Elevation
The shadows that lift a surface, and the z-index bands that decide what covers what.
Elevation has two parts: a shadow that shows a surface sits above the page, and a z-index band
that decides what actually covers what. A modal uses both, shadow-ws-high and z-ws-modal.
Shadows
shadow-ws-low, shadow-ws-medium and shadow-ws-high are the general levels: low for small
controls and cards, medium for dropdowns, cards and navigation, high for modals and popovers.
The others belong to one kind of component: buttons, form fields, the focus ring of an active
field, a frozen table column.
<div className="rounded-ws-container-md bg-ws-static-container shadow-ws-medium">…</div>
In dark mode most shadows are switched off or reduced to a 1px outline, because a dark shadow on a dark page does not read. Each class below is drawn on a light and a dark panel.
shadow-ws-low--ws-elevation-lowUsed by app-shell, segmented-controlshadow-ws-medium--ws-elevation-mediumUsed by action-bar, dropdown, select, switch, tile, toastshadow-ws-high--ws-elevation-highUsed by modal, popup, status-modal, toastshadow-ws-controls-control--ws-elevation-controls-controlUsed by button, filter-button, slidershadow-ws-forms-base--ws-elevation-forms-baseUsed by select, text-inputshadow-ws-table-freeze--ws-elevation-table-freezeUsed by tableshadow-ws-forms-activeUsed by datepicker, select, text-input, textareashadow-ws-forms-active-dangerUsed by datepicker, select, text-input, textareashadow-ws-focus-baseNot used by a componentdrop-shadow-ws-medium--ws-elevation-drop-mediumUsed by tooltipdrop-shadow-ws-controls-tooltip--ws-elevation-drop-controls-tooltipUsed by tooltipTo change a shadow, override its --ws-elevation-* variable in your stylesheet, under .dark
for the dark value. The three without one (forms-active, forms-active-danger, focus-base)
are compiled into the class; they take their colour from the dynamic and static colour tokens,
so they follow a re-brand.
drop-shadow-ws-* are filter shadows for shapes a box shadow cannot follow, such as the
tooltip with its arrow.
Z-index
Stacking uses named bands instead of numbers: z-ws-modal, z-ws-sticky. Components own the
upper bands (drawer, modal, popout, notification), so a tooltip opened inside a modal always
clears it. The lower bands are for your page layout.
<header className="sticky top-0 z-ws-sticky">…</header>
Each value is a range, not one step. Something that has to sit just above a band can add to it, as long as it stays below the next one:
<div className="z-[calc(var(--ws-z-index-sticky)+1)]" />
z-10, z-50 and the rest are Tailwind’s own scale and do not line up with these bands.
| Class | Value | Use it for |
|---|---|---|
z-ws-deep | -100 | Behind all other elements (decorative backgrounds) |
z-ws-base | 1 | Lift above siblings inside a local stacking context; not a default |
z-ws-masked | 100 | Content that other page elements are allowed to cover |
z-ws-mask | 200 | Page elements that cover masked content (frozen table column, page header) |
z-ws-sticky | 300 | Sticky elements that stay on top of page content (sticky header, ActionBar) |
z-ws-drawer | 700 | Sidepanel and other drawers |
z-ws-modal | 800 | Modal, StatusModal and their overlays |
z-ws-popout | 900 | Popup, Dropdown, Select list, Tooltip: floating content that must clear a modal |
z-ws-notification | 1000 | Toast: above everything |