2.4
Drawer
The Drawer component is a panel that slides out from the edge of the screen. It can be useful when you need users to complete a task or view some details without leaving the current page.
Import
js
import {
MpDrawer,
MpDrawerOverlay,
MpDrawerContent,
MpDrawerCloseButton,
MpDrawerHeader,
MpDrawerBody,
MpDrawerFooter
} from '@mekari/pixel3'Playground
API
MpDrawer
Props
Events
Slots
| Name | Type | Default |
|---|---|---|
id | string | - |
is-open | boolean | false |
is-block-scroll-on-mount | boolean | true |
is-close-on-esc | boolean | true |
is-close-on-overlay-click | boolean | true |
is-keep-alive | boolean | false |
placement | "left" | "right" | "top" | "bottom" | right |
size | "sm" | "md" | "lg" | "xl" | "2xl" | "full"; | md |
variant | "default" | "floating" | default |
MpDrawerContent
Slots
| Name | Type |
|---|---|
default | any |
MpDrawerHeader
Slots
| Name | Type |
|---|---|
default | any |
MpDrawerBody
Slots
| Name | Type |
|---|---|
default | any |
MpDrawerFooter
Slots
| Name | Type |
|---|---|
default | any |
Usage
Basic
Size
Variant
The floating variant displays the drawer as a card with rounded corners and margin from edges. Use only MpDrawerBody for content layout to preserve the rounded styling.