Z-Index

Z-index is a CSS property that controls how elements stack on top of each other. The stack order is defined by an element with a higher z-index appearing on top of an a element with a lower z-index.

Z-index and shadow are used together to help distinguish each layer in the stack. Shadow provides the visual element and z-index provides the structural element.

Salt provides z-index tokens that determine an item’s position in the layering order. By providing consistent z-indexes, the design system ensures a predictable hierarchy of visual elements when stacked on top of one another.

TokenValue
-zIndex-default1
-zIndex-appHeader1000
-zIndex-drawer1200
-zIndex-modal1300
-zIndex-notification1400
-zIndex-dragObject1420
-zIndex-contextMenu1450
-zIndex-flyover1500
Diagram showing a stack of elements to show how Z-index layers items.

We appreciate your thoughts and feedback on any content in the Salt foundations. Please contact us if you have any comments or questions.