This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.

Recipe: a floating Mac window

Use setWindowAlwaysOnTop(true) to float above ordinary Mac windows on the current Space.
Use setWindowAlwaysOnTop(true) to float above ordinary Mac windows on the current Space. setWindowIgnoreMouseEvents(true) passes clicks to the window underneath. A shortcut can turn click-through off again. setWindowOpacity(0.5, 250) fades to half opacity over 250 milliseconds. Omit the duration for an immediate change. Reduce Motion and the driver's frozen clock also apply the opacity immediately.
A strip with app-region="drag" moves the window when dragged. Give a button inside the strip app-region="no-drag" to keep it clickable. A double click on drag ground takes the person's title-bar action. An authored dblclick there takes precedence.
The three window commands are macOS commands. Other hosts journal the refusal by name. The agent reports floating, clickThrough and opacity in the window's state.
See window bounds for docking and aspect lock.
Use this recipe in my app
Paste this into Claude, Cursor, Codex, or another agent.
Is this helpful
Last updated November 24, 2026
Exact Docs