Components

Integrations

Modal

Ein Modal zeigt Inhalte zentriert als Overlay über der Hauptseite.GitHubMarkdown

Properties

PropertyTypeDefaultDescription
size"s" | "m" | "l""s"The size of the modal.
offCanvasboolean-Whether the modal should be displayed as an off canvas.
offCanvasOrientation"left" | "right""right"Whether the off canvas should be displayed on the right or left side of the screen.
controllerOverlayController-An overlay controller to control the modal state.
slotstring-Accepts "actionConfirm" to use the modal as a confirmation modal for an action.
isDismissableboolean-Whether the modal can be closed by clicking outside of it.
showCloseButtonboolean-Whether the close button should be visible
confirmOnCloseboolean-Whether closing the modal must be confirmed – use it to protect unsaved changes.
childrenReactNode-
wrapWithReactElement<unknown, string | JSXElementConstructor<any>>-A React element the component is wrapped with. The element is cloned and receives the component as its only child — useful to render the component inside a link, a tooltip trigger or any other wrapper without changing the surrounding markup.
refRef<HTMLSpanElement>-Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see React Docs
keyKey-
classNamestring-The elements class name.
isOpenboolean-Whether the overlay is open. Use it to control the overlay state.
isDefaultOpenbooleanfalseWhether the overlay is open initially. Use it for an uncontrolled overlay.

Events

PropertyTypeDefaultDescription
onOpenChangeOverlayOpenStateHandler-Called with the new open state whenever the overlay is opened or closed.
onCloseOverlayCloseHandler-Called when the overlay is closed.
onOpenOverlayOpenHandler-Called when the overlay is opened.

Auf dieser Seite