ModalOwnProps

Types

Link copied to clipboard
external interface SlotProps

Properties

Link copied to clipboard
abstract external override var children: ReactNode?

A single child content element.

Link copied to clipboard
abstract external var classes: ModalClasses?

Override or extend the styles applied to the component.

Link copied to clipboard
abstract external override var className: ClassName?
Link copied to clipboard
abstract external var closeAfterTransition: Boolean?

When set to true the Modal waits until a nested Transition is completed before closing.

Link copied to clipboard
abstract external var container: Element?

An HTML element or function that returns one. The container will have the portal children appended to it.

Link copied to clipboard
abstract external var disableAutoFocus: Boolean?

If true, the modal will not automatically shift focus to itself when it opens, and replace it to the last focused element when it closes. This also works correctly with any modal children that have the disableAutoFocus prop.

Link copied to clipboard
abstract external var disableEnforceFocus: Boolean?

If true, the modal will not prevent focus from leaving the modal while open.

Link copied to clipboard
abstract external var disablePortal: Boolean?

The children will be under the DOM hierarchy of the parent component.

Link copied to clipboard
abstract external var disableRestoreFocus: Boolean?

If true, the modal will not restore focus to previously focused element once modal is hidden or unmounted.

Link copied to clipboard
abstract external var disableScrollLock: Boolean?

Disable the scroll lock behavior.

Link copied to clipboard
abstract external var hideBackdrop: Boolean?

If true, the backdrop is not rendered.

Link copied to clipboard
abstract external var keepMounted: Boolean?

Always keep the children in the DOM. This prop can be useful in SEO situation or when you want to maximize the responsiveness of the Modal.

Link copied to clipboard
abstract external var key: Key?
Link copied to clipboard
abstract external var onClose: (event: Any, reason: String) -> Unit?

Callback fired when the component requests to be closed. The reason parameter can optionally be used to control the response to onClose.

Link copied to clipboard
abstract external var onTransitionEnter: () -> Unit?

A function called when a transition enters.

Link copied to clipboard
abstract external var onTransitionExited: () -> Unit?

A function called when a transition has exited.

Link copied to clipboard
abstract external var open: Boolean

If true, the component is shown.

Link copied to clipboard
abstract external var slotProps: ModalOwnProps.SlotProps?

The props used for each slot inside the Modal.

Link copied to clipboard
abstract external var slots: ModalSlots?

The components used for each slot inside the Modal. Either a string to use a HTML element or a component.

Link copied to clipboard
abstract external override var sx: SxProps<Theme>?

The system prop that allows defining system overrides as well as additional CSS styles.

Functions

Link copied to clipboard
open inline external fun <P : Props> child(type: ElementType<P>, props: P)
Link copied to clipboard
open inline operator external fun <P : Props> ElementType<P>.invoke()
open inline operator external fun <P : Props> ElementType<P>.invoke(noinline block: P.() -> Unit)
open inline operator external fun <T> Provider<T>.invoke(value: T, noinline block: ChildrenBuilder.() -> Unit)
Link copied to clipboard
open inline operator external fun Char.unaryPlus()
open inline operator external fun String?.unaryPlus()
open inline operator external fun ReactNode?.unaryPlus()
open inline operator external fun Props?.unaryPlus()