Skip to content

Z-Index ​

Utilities for controlling the stack order of an element in the DOM.

Class NameCSS Equivalent
index-pullbackz-index: -1;
index-surfacez-index: 0;
index-footerz-index: 0;
index-content-on-surfacez-index: 1;
index-sticky-containerz-index: 2;
index-sticky-list-headerz-index: 2;
index-sticky-toolbarz-index: 3;
index-sticky-coverz-index: 3;
index-content-on-stickyz-index: 3;
index-fabz-index: 4;
index-scrimz-index: 5;
index-slideoutz-index: 6;
index-overlayz-index: 7;

Setting the z-index ​

The z-index property specifies the stack order of an element. An element with greater stack order is always in front of an element with a lower stack order. Here are some examples of how to use these classes:

html
<div class="relative h-3xs w-full">
  <div class="[ surface-container-highest left-1/12 ] index-overlay">Overlay</div>
  <div class="[ surface-container-high left-2/12 ] index-scrim">Scrim</div>
  <div class="[ surface-container left-3/12 ] index-fab">FAB</div>
  <div class="[ surface-container-low left-4/12 ] index-surface">Surface</div>
  <div class="[ surface-container-lowest left-5/12 ] index-pullback">Pullback</div>
</div>
Overlay
Scrim
FAB
Surface
Pullback