Platform
Window actions
Minimise, zoom, fullscreen, rename, and the system's path picker.
RecentsDesktopDocumentsDownloads
Open
Design system.figLaunch film.mp4Tokens.json
A cancel answers Cancelled, not an empty list.
useWindowActions binds the window's verbs for the tree it is called in; a host
without them fails at setup, naming them.
const window = useWindowActions();
window.minimize();
window.zoom();
window.toggleFullscreen();
window.setTitle("Files");pickPaths opens the system panel and answers Picked or Cancelled, and fails
with FilePanelError if the platform refuses.
const chosen = await Effect.runPromise(
window.pickPaths({ directories: true, prompt: "Choose a folder" }),
);
if (chosen._tag === "Picked") copy(chosen.paths);| Action | What it does | Platform |
|---|---|---|
activate | brings the window forward | all |
minimize | sends it to the Dock | all |
zoom | the platform's zoom or maximise | all |
toggleFullscreen | enters or leaves fullscreen | all |
setTitle | renames the window | all |
pickPaths | opens the system path panel | all |
Edit this page on GitHubapps/docs/content/docs/platform/window.mdx