MNEE
v0.0.1

Components

Modal

In Progress

Centered overlay dialog for confirmations, forms, and focused interactions. Closes on backdrop click or Esc. Body scroll is locked while the modal is open.

Default

Size variants

Sub-components

ModalHeader, ModalBody, and ModalFooter are exported standalone for custom modal layouts. All three accept className and standard HTMLDivElement props.

// Canonical two-button footer using sub-components<Modal isOpen={open} onClose={close}>  <ModalHeader>    <h2 className="text-lg font-semibold flex-1">Delete record</h2>  </ModalHeader>  <ModalBody>    <p className="text-sm text-gray-600">This action cannot be undone.</p>  </ModalBody>  <ModalFooter>    <div className="flex justify-end gap-2">      <Button variant="ghost" onClick={close}>Cancel</Button>      <Button variant="destructive" onClick={handleDelete}>Delete</Button>    </div>  </ModalFooter></Modal>
ComponentRole
ModalHeaderFlex row with bottom border — place title and close button here
ModalBodyScrollable content area with vertical padding
ModalFooterSticky bottom bar with top border — place action buttons here

Usage

import { Modal, ModalHeader, ModalBody, ModalFooter } from "@mnee-ui/ui"

Props

PropTypeDefaultDescription
isOpenbooleanControls open/close state
onClose() => voidCalled on backdrop click or Esc key
titlestringHeader title text
size"sm" | "md" | "lg""sm"Panel width: 400 / 520 / 640 px
footerReactNodeSticky footer content (e.g. action buttons)
childrenReactNodeScrollable body content
classNamestringLayout utilities only (margin, padding, width)