Account

Chrome

Creative

Window Frame

Title bar to drag it by, a roll-up button and a close button you handle. For working product shots and playful desktop pages.

Install

Included with Creative: needs your API key. Initialize and log in once.

Terminal
npx @galactrex/ui add window-frame

Usage

Example
import { WindowFrame } from "@/components/galactrex/window-frame";

<WindowFrame title="Notes.txt" onClose={close}>…</WindowFrame>

Source

Installs to components/galactrex/window-frame.tsx, with the shared motion primitives beside it.

Source for this component comes with its plan. Install it with the command above, or open your licensed copy here.

See plans

Props

PropTypeDefaultDescription
childrenReactNode—Content.
titlestring—Window title.
draggablebooleantrueDrag by the title bar.
collapsiblebooleantrueRoll-up button.
onClose() => void—Shows a close button.
classNamestring—Extra classes for the outer element.

Variants

  • Desktop. Several windows on a page.

Accessibility

  • A labelled section; title bar buttons are real buttons with names.

Motion and reduced motion

  • Height spring for roll-up; drag without momentum.
  • Reduced motion: no height animation.