Skip to content
ArcadiaDesign

TSX

A layer over the whole window that holds the focus while it stands: what is behind it is inert and does not scroll, Tab goes round what it holds, and a menu, a popover or a tooltip opened from it stands inside it, in its theme. It takes the focus as it opens, itself by default so its keys work at once, or initialFocus; as it goes the focus returns to what had it, or to finalFocus. The image viewer and the image markup editor stand in one; a product stands its own whole-window views in one too, never a dialog stretched to the edges.

It draws nothing of its own: what stands in it lays itself out and draws its ground, or sets --overlay-bg. It does not move: what stands in it opens and closes as its kind does.

rootStyle takes the knob below.

--overlay-bg
PaintDefault transparent
Its ground. Default none: what stands in it draws its own.

A modal dialog named by label, in the product's words. Everything else on the page is inert while it stands, so a reader stays inside it too. With onClose, Escape closes it, unless something opened from it takes the key first; without it, Escape is left to what it holds (the markup editor keeps what was drawn).

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.