Window Frame

Frames a piece of UI as a desktop app window.

@paneui/themeclass-variance-authority
Northwind

Weekly report

Signups are up 12% on last week.

Installation

pnpm dlx shadcn@latest add @paneui/window-frame

Usage

Composition

Examples

Glass

Use over pictures and tinted sections.

Centred title

Without controls

Corners

The body is inset 6px and its corner is the frame's minus that inset, so the two stay concentric at every radius preset and in the Paper style.

Decoration only

The window dots are hidden from assistive tech and do nothing. Put real controls in WindowFrameActions.

API Reference

WindowFrame

Also accepts every prop of div.

variant= "solid"
"solid" | "glass"
glass is a translucent, blurred shell for use over pictures.
size= "default"
"sm" | "default"
Title bar height: 32px or 36px.
PropTypeDefaultDescription
variant"solid" | "glass""solid"glass is a translucent, blurred shell for use over pictures.
size"sm" | "default""default"Title bar height: 32px or 36px.
data-variant
The variant.
data-size
The size.
Data attributeDescription
data-variantThe variant.
data-sizeThe size.

WindowFrameBar

Also accepts every prop of div.

controls= true
boolean
Starts the bar with the three window dots.
PropTypeDefaultDescription
controlsbooleantrueStarts the bar with the three window dots.

WindowFrameTitle

Also accepts every prop of span.

align= "start"
"start" | "center"
center puts the title on a chip in the middle of the bar.
PropTypeDefaultDescription
align"start" | "center""start"center puts the title on a chip in the middle of the bar.

WindowFrameActions

Pushed to the end of the bar. Also accepts every prop of span.

WindowFrameControls

The three dots, for a custom bar. Also accepts every prop of span.

WindowFrameBody

The content area. Give it a height or let its content size it. Also accepts every prop of div.