Window is a zero-dependency component — there is no build step, no package to install, and no framework required. You can drop it into any existing HTML page by linking two files and copying a short block of markup.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mr-sunset/window/llms.txt
Use this file to discover all available pages before exploring further.
Add the stylesheet and script
Referencestyle.css in the <head> of your page and load script.js just before the closing </body> tag. Placing the script at the bottom of <body> ensures the DOM is fully parsed before the event listeners are registered.
Add the window markup
Copy the following#window-container structure anywhere inside your <body>. The script targets elements by their IDs, so keep all IDs exactly as shown.
#window-container— the outermost shell;position: absolutelets it float over all other content.#title-bar— the drag handle;mousedownon this element starts the drag interaction.#window-buttons— houses the three traffic-light circles (close, minimise, maximise).#close(.btn.close) — the red button; clicking it hides the window.#window-content— your content area; replace or extend what’s inside freely.
Place it on any page
Below is a minimal page that already has its own content, with the Window component injected. The window renders on top of everything else because it usesposition: absolute and is stacked above the normal document flow.
The window uses
position: absolute, which positions it relative to its nearest positioned ancestor. The default <body> element has no positioning context (position: static), so the window positions itself relative to the initial containing block — the viewport — which is exactly the intended behaviour. Avoid wrapping #window-container inside a parent that has position: relative, overflow: hidden, or a fixed size, as that would clip or reanchor the floating window unexpectedly.Showing and hiding programmatically
Clicking the close button sets both#title-bar and #window-container to display: none. To bring the window back — for example when a user clicks a button on your page — reset the display property to block: