open controls existence. visible controls visibility. open={true} visible={false} creates a hidden window with state preserved. open={false} destroys everything.
Initial size. Applied once on creation. User can resize freely.
defaultX / defaultY
number
Initial position. Applied once on creation.
width / height
number
Controlled size. Changes resize the window. Use with onBoundsChange.
x / y
number
Controlled position. Changes move the window.
onBoundsChange
(bounds) => void
Fires on resize/move. Debounced internally (100ms).
minWidth / maxWidth
number
Size constraints.
minHeight / maxHeight
number
Size constraints.
center
boolean
Center on creation. Default true when no position specified.
The default* / controlled split follows React’s defaultValue / value pattern. Use defaultWidth for fire-and-forget sizing, width + onBoundsChange for two-way sync.
Creation-only props cannot change after the window is created. Changing them logs a dev warning. Set recreateOnShapeChange to destroy and recreate the window instead — note that this unmounts and remounts all children, so any useState/useRef inside them resets.