Window

Non-modal windows and modal dialogs. Non-modal windows (default) are draggable and stack with z-index management. Modal windows show an overlay and block page interaction.

Non-Modal Window (Default)

Non-modal windows are draggable by default, have no overlay, and re-order to front when clicked.

Modal Window

Modal windows show an overlay, block interaction with the page, and are not draggable.

Draggable Modal (Override)

You can explicitly make a modal draggable with ->draggable().

Content via JavaScript

Open a window to see output...
PHP

PHP PHP Methods (Fluent)

Method / PropertyParametersDescription
$m->window($id, $title)string, stringCreate a window component (non-modal by default).
->title($title)stringSet the window title.
->content($html)stringSet body HTML content.
->modal($isModal)boolMake window modal with overlay (default: false). Modals block interaction and are not draggable unless ->draggable() is called.
->draggable($drag)boolAllow dragging by title bar. Default: true for non-modal windows, false for modals.
->resizable($resize)boolAllow window resizing.
->scrollable($scroll)boolEnable content area scrolling (default: true).
->width($w)stringWindow width (CSS value, e.g. 500px).
->height($h)stringWindow height.
->minWidth($w)stringMinimum width.
->minHeight($h)stringMinimum height.
->addButton($text, $action, $style)string, string, stringAdd a footer button. Style: primary, secondary, danger.
->visible($vis)boolShow the window on page load.

JS JS Methods

Method / PropertyParametersDescription
m.window(id, opts)string, ?objectGet or create Window instance.
open()Show the window.
close()Hide the window.
toggle()Toggle visibility.
setTitle(html)stringUpdate the title bar.
setContent(html)stringReplace body content.
loadContent(url, fetchOpts)string, ?objectFetch HTML from a URL and set as content (returns Promise).

EVENT Events

Event NameDetailDescription
m:window:openFired when the window opens.
m:window:closeFired when the window closes.
m:window:action{action}Fired when a footer button is clicked.
m:window:content-loaded{url}Fired after loadContent() completes.