Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Windows

  • Safari
  • WindowFrame
  • Chrome
  • Terminal

Devices

  • iPhone
  • Android
  • Tablet
  • Watch

WindowFrame

window-frame

Wraps 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

NameTypeDefaultDescription
titleReactNode-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
toolbarReactNode-Action slot at the right end of the title bar
Extends native <div> attributes (className lands on the frame, for width and height).

Slots

SlotTypeDescription
childrenReactNodeWindow 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

Safari · Chrome · Terminal

Playground

dashboard

Orders overview

128 new orders this week, 1.2% refunded.

<WindowFrame title="dashboard">
  …
</WindowFrame>
PreviousSafariDevice MockupsNextChrome

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Slots
    • Pitfalls
    • Related
  • Playground