Skip to content
Preview

Overlay

labelrequired
string
Its name for assistive technology, in the product's words.
onClose
(event: Event) => void
Escape closes it, when nothing opened from it takes the key first; it is handed that key's event. 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.

State machine

Preview