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-control
Light
Dark0 0 0 0 transparent
shadow-ws-medium--ws-elevation-mediumUsed by action-bar, dropdown, select, switch, tile, toast
Light
Dark0px 0px 0px 1px var(--ws-static-shadow-outline)
shadow-ws-high--ws-elevation-highUsed by modal, popup, status-modal, toast
Light
Dark0px 0px 0px 1px var(--ws-static-shadow-outline)
shadow-ws-controls-control--ws-elevation-controls-controlUsed by button, filter-button, slider
Light
Dark0 0 0 0 transparent
shadow-ws-forms-base--ws-elevation-forms-baseUsed by select, text-input
Light
Dark0 0 0 0 transparent
shadow-ws-table-freeze--ws-elevation-table-freezeUsed by table
Light
Dark0 0 0 0 transparent
shadow-ws-forms-activeUsed by datepicker, select, text-input, textarea
Light
Darkcolours follow the theme
shadow-ws-forms-active-dangerUsed by datepicker, select, text-input, textarea
Light
Darkcolours follow the theme
shadow-ws-focus-baseNot used by a component
Light
Darkcolours follow the theme
drop-shadow-ws-medium--ws-elevation-drop-mediumUsed by tooltip
Light
Darkdrop-shadow(0 0 1px var(--ws-static-shadow-outline))
drop-shadow-ws-controls-tooltip--ws-elevation-drop-controls-tooltipUsed by tooltip
Light
Darknone

To 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.

ClassValueUse it for
z-ws-deep-100Behind all other elements (decorative backgrounds)
z-ws-base1Lift above siblings inside a local stacking context; not a default
z-ws-masked100Content that other page elements are allowed to cover
z-ws-mask200Page elements that cover masked content (frozen table column, page header)
z-ws-sticky300Sticky elements that stay on top of page content (sticky header, ActionBar)
z-ws-drawer700Sidepanel and other drawers
z-ws-modal800Modal, StatusModal and their overlays
z-ws-popout900Popup, Dropdown, Select list, Tooltip: floating content that must clear a modal
z-ws-notification1000Toast: above everything