API and Development
Load blocks/takeover-dialog/styles.css and the stylesheets of Dialog, Box, Button, Icon, and Text.
| Name | Required | Description |
|---|---|---|
title | yes | Heading and accessible name. |
closeLabel | yes | Accessible name of the close control. |
children | yes | Scrolling body. |
description | no | Supporting text under the title. Accessible description. |
footer | no | Actions, ordered tertiary, Cancel, then one primary. |
scrollRegionLabel | no | Name of the body scroll region when it overflows. |
trigger | no | One Button or Link that opens the dialog. |
open | no | Controlled open state. |
defaultOpen | no | Initial open state when uncontrolled. |
onOpenChange | no | Requested open state and cancelable details. |
ref | no | The dialog element. |
className | no | Classes on the dialog surface. |
| Old | New |
|---|---|
TakeoverPage | TakeoverDialog |
onClose | onOpenChange when open is false |
footerContent | footer |
titlePrefix, headerContent | Render them in children |
TakeoverPageHeader, TakeoverPageBody, TakeoverPageFooter | The block's header, children, and footer |
TakeoverPagePortal, TAKEOVER_PAGE_PORTAL_ID | Do not mount a portal. The dialog opens in the trigger's document. |
useTakeoverClose | Delete it. Dialog runs the exit. |
A display value for title | A LocalizedMessage |
The dialog fills the viewport. It does not sit below a navbar offset.