Props

io.github.nafg.scalajs.facades.mui.Modal.Props
class Props extends WithChildren[Any]

Attributes

Graph
Supertypes
trait WithChildren[Any]
trait PropTypes
class Object
trait Matchable
class Any

Members list

Type members

Inherited classlikes

object dyn extends Dynamic

Attributes

Inherited from:
PropTypes
Supertypes
trait Dynamic
class Object
trait Matchable
class Any

Value members

Concrete methods

def BackdropComponent: Prop[ElementType]

A backdrop component. This prop enables custom backdrop rendering.

A backdrop component. This prop enables custom backdrop rendering.

Attributes

def children: Prop[Any]

A single child content element.

A single child content element.

Attributes

def classes: Prop[Object]

Override or extend the styles applied to the component.

Override or extend the styles applied to the component.

Attributes

def closeAfterTransition: Prop[Boolean]

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

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

Attributes

def component: Prop[ElementType]

The component used for the root node. Either a string to use a HTML element or a component.

The component used for the root node. Either a string to use a HTML element or a component.

Attributes

def components: Prop[Object]

The components used for each slot inside.

The components used for each slot inside.

This prop is an alias for the slots prop. It's recommended to use the slots prop instead.

Attributes

def componentsProps: Prop[Object]

The extra props for the slot components. You can override the existing props or add new ones.

The extra props for the slot components. You can override the existing props or add new ones.

This prop is an alias for the slotProps prop. It's recommended to use the slotProps prop instead, as componentsProps will be deprecated in the future.

Attributes

def container: Prop[Any | Any => Any]

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

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

You can also provide a callback, which is called in a React layout effect. This lets you set the container from a ref, and also makes server-side rendering possible.

By default, it uses the body of the top-level document object, so it's simply document.body most of the time.

Attributes

def disableAutoFocus: Prop[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.

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.

Generally this should never be set to true as it makes the modal less accessible to assistive technologies, like screen readers.

Attributes

def disableEnforceFocus: Prop[Boolean]

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

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

Generally this should never be set to true as it makes the modal less accessible to assistive technologies, like screen readers.

Attributes

def disableEscapeKeyDown: Prop[Boolean]

If true, hitting escape will not fire the onClose callback.

If true, hitting escape will not fire the onClose callback.

Attributes

def disablePortal: Prop[Boolean]

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

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

Attributes

def disableRestoreFocus: Prop[Boolean]

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

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

Attributes

def disableScrollLock: Prop[Boolean]

Disable the scroll lock behavior.

Disable the scroll lock behavior.

Attributes

def hideBackdrop: Prop[Boolean]

If true, the backdrop is not rendered.

If true, the backdrop is not rendered.

Attributes

def keepMounted: Prop[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.

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.

Attributes

def onClick: Prop[ReactMouseEventFromHtml => Callback]
def onClose: Prop[Any => Any]

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

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

Value parameters

{object}

event The event source of the callback.

{string}

reason Can be: "escapeKeyDown", "backdropClick".

Attributes

def onTransitionEnter: Prop[Any => Any]

A function called when a transition enters.

A function called when a transition enters.

Attributes

def onTransitionExited: Prop[Any => Any]

A function called when a transition has exited.

A function called when a transition has exited.

Attributes

def open: Prop[Boolean]

If true, the component is shown.

If true, the component is shown.

Attributes

def slotProps: Prop[Object]

The props used for each slot inside the Modal.

The props used for each slot inside the Modal.

Attributes

def slots: Prop[Object]

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

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

Attributes

def style: Prop[Object]
def sx: Prop[Seq[Any => Any | Object | Boolean] | Any => Any | Object]

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

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

Attributes

Deprecated methods

def BackdropProps: Prop[Object]

Props applied to the Backdrop element.

Props applied to the Backdrop element.

Attributes

Deprecated
true
def onBackdropClick: Prop[Any => Any]

Callback fired when the backdrop is clicked.

Callback fired when the backdrop is clicked.

Attributes

Deprecated
true

Inherited methods

def of[A : Writer](implicit evidence$1: Writer[A], name: Name): Prop[A]

Attributes

Inherited from:
PropTypes

Inherited fields

val key: Prop[Key]

Attributes

Inherited from:
PropTypes