Modal

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

Properties

PropertyTypeDescription
size
smlDefault: "s"
The size of the modal.
offCanvas
boolean
Whether the modal should be displayed as an off canvas.
offCanvasOrientation
leftrightDefault: "right"
Whether the off canvas should be displayed on the right or left side of the screen.
controller
OverlayController
An overlay controller to control the modal state.
slot
string
Accepts "actionConfirm" to use the modal as a confirmation modal for an action.
isDismissable
boolean
Whether the modal can be closed by clicking outside of it.
showCloseButton
boolean
Whether the close button should be visible
confirmOnClose
boolean
Whether closing the modal must be confirmed – use it to protect unsaved changes.
children
ReactNode
wrapWith
ReactElement<unknown, string | JSXElementConstructor<any>>
ref
Ref<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
key
Key
className
string
The elements class name.
isOpen
boolean
isDefaultOpen
boolean

Events

PropertyTypeDescription
onOpenChange
OverlayOpenStateHandler
onClose
OverlayCloseHandler
onOpen
OverlayOpenHandler

Auf dieser Seite