Chrome
CreativeWindow 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.
npx @galactrex/ui add window-frameUsage
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.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Content. |
title | string | — | Window title. |
draggable | boolean | true | Drag by the title bar. |
collapsible | boolean | true | Roll-up button. |
onClose | () => void | — | Shows a close button. |
className | string | — | 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.