$ rezi
Widgets

Layers

Stack-based overlay system used for modals, dropdowns, and transient UI.

Stack-based overlay system used for modals, dropdowns, and transient UI.

Usage

ui.layers([
  MainContent(),
  state.showModal && ui.modal({ /* ... */ }),
  state.menuOpen && ui.dropdown({ /* ... */ }),
])

Notes

  • Child order defines z-order: later children render on top.
  • Use Layer for explicit z-index or custom backdrops.
  • Overlay primitives (Modal, Layer, Dropdown, CommandPalette, Toast) share frameStyle for consistent background/foreground/border customization.
  • Layers enable deterministic hit testing and focus management across overlaps.
  • Backdrops (from Modal and Layer) render behind the active overlay(s) and stack in draw order.

On this page