Window requires no package manager, no bundler, and no framework — just three files and a browser. Follow the steps below and you will have a fully interactive, draggable macOS-style window running locally in minutes.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.
Copy the files
The entire component lives in three files. Create a new folder and add each one.Then copy
index.html— the page shell and window DOM structurestyle.css— all visual styling, including dark-mode supportscript.js— drag and close behaviour
index.html. Copy the markup below exactly as shown — it wires up the stylesheet and script, and provides the #window-container, #title-bar, and #window-content elements that the JavaScript targets by ID.index.html
style.css and script.js from the repository into the same folder so that the relative paths in index.html resolve correctly.Open in your browser
Open You should see a white, rounded window centred on a soft gradient background. In dark mode the background and window chrome switch to dark colours automatically.
index.html directly in any modern browser — no local server needed.Drag the window
Click and hold anywhere on the title bar — the strip at the top of the window containing the three coloured circles — then move the mouse. The window follows your cursor in real time. Release the mouse button to drop the window in its new position.
Dragging is scoped to the title bar. Clicking inside
#window-content does not initiate a drag.Replace the placeholder content
The#window-content div ships with a single <button>Click me</button> as a placeholder. Replace it with any HTML you like — text, images, forms, or other components.
index.html
400px tall and centres its children both vertically and horizontally using flexbox, so short content will always appear in the middle of the panel without any extra CSS.
What’s next
Embedding
Learn how to drop the Window component into an existing page alongside other content.
Customization
Change the window’s size, colours, border radius, and shadow to match your design.
Dark Mode
Understand how the built-in dark-mode media query works and how to extend it.