web/docs/overlay.md
Use @langgenius/dify-ui/* primitives for overlays in new and modified web
code. Do not import raw Base UI overlays or legacy web overlays from
@/app/components/base/modal, @/app/components/base/dialog, or
@/app/components/base/drawer.
@langgenius/dify-ui/dialog for modal surfaces that need focus
management, scroll locking, escape handling, and outside-press dismissal.@langgenius/dify-ui/alert-dialog only for destructive or must-confirm
decisions.@langgenius/dify-ui/drawer for side panels, setup panels, and nested
editor panels that must behave like a drawer. Do not add separate web drawer
wrappers.@langgenius/dify-ui/popover or the web Infotip wrapper for
explanatory content, long help text, rich layout, or interactive content.@langgenius/dify-ui/tooltip only for short, non-interactive labels where
the trigger already has its own accessible name.Dialog.open / onOpenChange when business state, analytics, or
cleanup must react to open state changes.render prop, render a real <button type="button"> for button-like
triggers; use nativeButton={false} only for intentional non-button triggers.Infotip for visible ? help triggers. Give icon-only triggers an
accessible name.All body-portalled Dify UI overlays use z-50. Toast uses z-60. The app root
must keep an isolated stacking context.
Do not add call-site z-index overrides such as z-9999. If an overlay is
clipped or hidden, fix the parent overlay structure instead of raising the
child primitive.