For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/foundations/layering.md.

Layering

Components: Drawer, Dialog, DropdownMenu, Select, Popover, HoverCard, Calendar, FilterCascade

+8 more

Tooltip, Toaster, SearchModal, Tour, SelectionBulkBar, TableActionBar, FeedbackPulse, PageHeader

Overlays stack themselves by nesting depth. App code never sets z-index on a design-system overlay.

What you use

NeedUseNot
A panel over the pageDrawerA fixed div with z-50
A modal over the page or over a drawerDialog from @wallarm-org/design-system/DialogA second Drawer styled as a modal
A menu, select, popover, hover card or date picker inside a drawer or dialogDropdownMenu, Select, Popover, HoverCard, Calendar, FilterCascade as-isA z-[100] class on the content
A hint above everythingTooltipA Popover with a raised z-index
A notification above every drawer and dialoguseToast() from @wallarm-org/design-system/Toast, plus one ToasterA Drawer without overlay
A sticky page headerPageHeader with stickysticky top-0 z-50 in app code
Bulk actions for a table in a drawer or dialogButtons in DrawerFooter or DialogFooterTableActionBar

What does not exist:

  • No z-index token scale and no z-overlay, z-modal, z-popover or z-toast utility.
  • No zIndex prop on any overlay.
  • No portal={false} or container prop on Drawer, Dialog, DropdownMenu, Select, Popover or Tooltip.
  • No Overlay export. The backdrop comes from Drawer and Dialog when overlay is true.
  • No Dialog in the package root. Import it from @wallarm-org/design-system/Dialog.

Rules

  • If an overlay opens from inside another overlay, render it as a React child of the parent's content. Depth comes from the React tree.
  • If you open a Dialog from a Drawer, put the Dialog inside DrawerContent. Only a React-ancestor drawer or dialog dismisses the nested one.
  • If you nest a Drawer in a Drawer, or a Dialog in a Dialog, expect the parent to scale back. A Dialog over a Drawer does not scale the drawer.
  • If a dropdown, select, popover, calendar or tooltip sits in any overlay, use it as-is. It already paints above its host.
  • If your app has its own fixed element (chat widget), keep its z-index below 40. At 40 or higher it paints over the drawer backdrop.
  • If your app has its own sticky element inside a scroll area, use z-10.
  • Never add a z-* class or style={{ zIndex }} to DrawerContent, DropdownMenuContent, SelectPositioner, PopoverContent, HoverCardContent, CalendarContent or TooltipContent.
  • If chrome you can't change (a framework or docs-site header) sits at z-index 40 or higher, raise --drawer-overlay-z-index and --drawer-positioner-z-index together on :root above it, positioner 10 higher. Keep both under 900.
  • Never override --tooltip-z-index or --toast-z-index, and never change only one of the two drawer variables.
  • Never wrap an overlay trigger in transform, filter or isolation: isolate to fix stacking. Overlay content is portaled to document.body.
  • Never open SearchModal from inside a Drawer or Dialog. The backdrops cover the search box.
  • Never start a Tour while a Drawer or Dialog is open. The drawer ties with or covers the tour.
  • Never show TableActionBar for a table inside a Drawer or Dialog. The drawer ties with or covers the bar.

Examples

A menu inside a drawer paints above the drawer with no z-index class.

<DrawerContent>
  <DrawerBody>
    <DropdownMenu>
      <DropdownMenuTrigger asChild>
        <Button variant='outline' color='neutral'>Actions</Button>
      </DropdownMenuTrigger>
      <DropdownMenuContent>
        <DropdownMenuItem>Duplicate</DropdownMenuItem>
      </DropdownMenuContent>
    </DropdownMenu>
  </DrawerBody>
</DrawerContent>

A confirm dialog opened from a drawer is a React child of DrawerContent.

import { Dialog, DialogContent, DialogTitle, DialogTrigger } from '@wallarm-org/design-system/Dialog';

<DrawerFooter>
  <Dialog>
    <DialogTrigger asChild>
      <Button variant='primary' color='brand'>Delete</Button>
    </DialogTrigger>
    <DialogContent>
      <DialogTitle>Delete rule?</DialogTitle>
    </DialogContent>
  </Dialog>
</DrawerFooter>

An app-owned floating widget stays below the drawer backdrop.

<div className='fixed right-16 bottom-16 z-30'>{chat}</div>

Reference

Depth-based overlays

Drawer, Dialog, DropdownMenu, Select, Popover, HoverCard, Calendar and FilterCascade. Each level adds 20.

DepthBackdropContent
04050
16070
28090
3100110

Fixed overlays

Componentz-index
Tooltip1000
Toaster900
SelectionBulkBar (placement='floating')200
TableActionBar, Tour, FeedbackPulse50
SearchModal41
Tour backdrop40

Variables

VariableValue
--drawer-overlay-z-index40
--drawer-positioner-z-index50
--toast-z-index900
--tooltip-z-index1000

In-flow values

In-component only; never competes with overlays.

ValueWhere
z-10PageHeader sticky, sticky menu group labels, pinned table body cells
z-30 to z-40Table headers