WindowFrame
window-frameWraps a piece of UI in an app window with a traffic-light title bar, like a product screenshot.
Usage
Basic usage
Traffic lights and a title wrap a piece of product UI into an "app screenshot"; a string title renders as small monospace text.
dashboard
Orders overview
128 new orders this week, 1.2% refunded.
tsx
<WindowFrame title="dashboard">
<div className="p-5">…</div>
</WindowFrame>Node title and toolbar
title can also hold nodes such as a Tag; toolbar sits at the right end of the title bar.
MCP
Orders overview
128 new orders this week, 1.2% refunded.
tsx
<WindowFrame
title={<Tag tone="brand" size="sm">MCP</Tag>}
toolbar={<Button size="xs" variant="ghost">Clear</Button>}
>
…
</WindowFrame>When to use
For showing "one app window": product previews, AI chat windows, code demos. Traffic lights, a title, and an action slot on the right, with no address bar. For a browser shell (address bar, tabs) use Safari / Chrome; to play back commands line by line use Terminal.
Import
ts
import { WindowFrame } from "@hulianui/ui"Props
| Name | Type | Default | Description |
|---|---|---|---|
| title | ReactNode | - | Title slot to the right of the traffic lights. A string renders as small monospace text (like a file name or route); nodes such as a Tag work too |
| toolbar | ReactNode | - | Action slot at the right end of the title bar |
Extends native<div>attributes (classNamelands on the frame, for width and height).
Slots
| Slot | Type | Description |
|---|---|---|
| children | ReactNode | Window content; the content area has no padding |
Pitfalls
- The content area has no padding: screenshot-style content fills it, while chat or form content adds its own padding.
- The traffic lights use fixed macOS colors and don't follow the theme color (a device convention, same as Safari).
Related
Playground
dashboard
Orders overview
128 new orders this week, 1.2% refunded.
<WindowFrame title="dashboard">
…
</WindowFrame>