Skip to content

2.4

Modal

Modal used to display critical information, request user input, or provide notifications that require immediate attention.

Modal ​

Dialog that focuses user attention exclusively on an information via a window that is overlaid on primary content.

Import ​

js
import {
  MpModal,
  MpModalOverlay,
  MpModalContent,
  MpModalHeader,
  MpModalFooter,
  MpModalBody,
  MpModalCloseButton
} from '@mekari/pixel3'

Playground ​

API ​

MpModal ​

Props
Events
Slots
NameTypeDefault
id
Id of modal.
string -
is-open
If true, modal will open.
booleanfalse
is-block-scroll-on-mount
If true, scrolling will be only active in modal body.
booleantrue
is-close-on-esc
If true, pressing esc key modal will close.
booleantrue
is-close-on-overlay-click
If true, when overlay clicked modal will close.
booleantrue
is-keep-alive
If true, modal will be hidden using CSS instead of destroying DOM.
booleanfalse
is-centered
If true, modal will be centered on screen.
booleanfalse
is-disable-portal
If true, modal portal will be disabled.
booleanfalse
is-disable-focus-trap
If true, focus trap will be disabled.
booleanfalse
scroll-behavior
Where scroll behaviour should originate.
"inside" | "outside" | "auto"outside
size
Size of modal.
"sm" | "md" | "lg" | "xl" | "2xl" | "full";md

MpModalContent ​

Slots
NameType
default
Modal content slot
any

MpModalHeader ​

Slots
NameType
default
Modal header slot
any

MpModalBody ​

Slots
NameType
default
Modal body slot
any

MpModalFooter ​

Slots
NameType
default
Modal footer slot
any

Usage ​

Scrollable ​

Size ​