Overlay
A layer over the whole window that holds the focus: the page behind inert, Tab inside, Escape to close, the focus given back.
import { Overlay } from "@arcadia/ui"TSX
--overlay-bg- PaintDefault transparent
- Its ground. Default none: what stands in it draws its own.
- Esc
- Closes it, with
onClose - Tab
- Moves round what it holds, never out of it
Overlay
labelrequired- string
- Its name for assistive technology, in the product's words.
onClose- () => void
- Escape closes it, when nothing opened from it takes the key first. Without it, Escape is left to what it holds.
initialFocus- RefObject<HTMLElement | null>
- What takes the focus as it opens. Default: the layer itself, so its keys work at once.
finalFocus- () => HTMLElement | null | undefined
- Where the focus goes as it goes; asked then. Default, or when it answers nothing: what had the focus before.
rootStyle- RootStyle<OverlayKnobs>
- Typed StyleX override: layout and
--overlay-bg.
Rest props go to <div> props.