Officina UI
Components

Window

Draggable, resizable, non-modal floating window for multi-pane workspaces.

Window is a portaled, non-modal floating panel you can drag by its title bar and resize from the corner — for tool palettes, pop-out panels, and multi-window dashboards. The page behind stays interactive (aria-modal="false"). Double-click the title bar or use the maximize control to toggle fullscreen, and press Escape to close. Controlled via open/onClose; tune initialPosition, initialSize, resizable, and maximizable.

Example

Preview
import { Window } from '@officina/ui';

<Window
  open={open}
  onClose={() => setOpen(false)}
  title="Inspector"
  initialSize={{ width: 480, height: 360 }}
>
  {/* panel content */}
</Window>;

API

PropTypeDefaultDescription
children*ReactNode—Window body content.
onClose*() => void—Called when the window is closed.
open*boolean—Whether the window is open (controlled).
initialPosition{ x: number; y: number; }{ x: 80, y: 80 }Starting top-left position in pixels.
initialSize{ width: number; height: number; }{ width: 480, height: 360 }Starting size in pixels.
maximizablebooleantrueShow the maximize control.
minHeightnumber160Minimum height when resizing.
minWidthnumber280Minimum width when resizing.
onFocus() => void—Called when the window gains focus (e.g. to raise it).
resizablebooleantrueAllow the user to resize the window.
zIndexnumber50Stack order among multiple windows.

On this page