Windows
A window presents UI views and components in your app or game. On the web this is a presentational shell for demos, screenshots, and app-like layouts. It does not drag or resize.
Preview
Anatomy
Two window styles share one structure: the document window and the utility panel (.p-window-compact, for inspectors and panels).
| Part | Document window | Utility panel |
|---|---|---|
| Radius | 16px, continuous corner | 15px, plain arc |
| Shadow | 0 18px 54px at 30% plus a blurred 1px hairline at 80% | 0 5px 20px at 30% |
Corner with corner-shape (Chromium 139 and later) | superellipse(1.465) over a 21px span | Not used |
Browsers without corner-shape fall back to the plain 16px arc.
Focus is a separate axis. .p-window-inactive applies to either style: the shadow shortens to 0 7px 21px at 20%, the lights and title gray out, toolbar glass flattens, and the sidebar lightens and grays its icons.
| Class | Role |
|---|---|
.p-window | Document shell. Radius 16px, window shadow, flex column. |
.p-window-compact | Utility panel. Radius 15px, small shadow, centered title. |
.p-window-titlebar | The translucent band with a 0.67px hairline. |
.p-window-titlebar-row | Lights, title and toolbar items, in order. |
.p-window-titlebar-unified | Title and toolbar share one row: a 52px band. |
.p-window-titlebar-small | With -unified, small (24px) groups: a 40px band. |
.p-window-toolbar | A second row of glass groups under the title: a 75px band. |
.p-window-titles / .p-window-subtitle | Title with an optional subtitle line. |
.p-window-spacer | Pushes the items after it to the trailing edge. |
.p-window-split / .p-window-main | Sidebar window: a full-height sidebar beside a main column. |
.p-window-content | Scrollable content area, 16px padding. |
.p-window-inactive | Unfocused state for the whole window. |
Titlebar
The title leads the titlebar.
| Part | Value |
|---|---|
| Title position | 24px after the zoom light in a 32px band, with lights 8px in |
| Title text | 13px bold at 85% ink |
| Proxy icon | .p-window-title-icon, 4px before the title at the same ink |
| Subtitle | 11px at weight 510 in #999999, for state such as “Edited”. Wrap the title in .p-window-titles to add it. |
The band is a scroll-edge material rather than an opaque strip: white at 85% over a light blur (#1F1F1F at 55% in dark mode), closed by a 0.67px hairline at rgba(0, 0, 0, 0.05).
A toolbar is a set of glass groups from toolbars, placed 8px from the band edges and 8px apart. There are three layouts:
- Unified, regular (
.p-window-titlebar-unified). A 52px band with lights 18px in. The first group sits 16px after the zoom light and the title 8px after that group. - Unified, small (add
.p-window-titlebar-small). The same layout with 24px groups, in a 40px band. - Two rows. A 32px title row, then
.p-window-toolbarwith 36px groups, for a 75px band.
To hide the title, leave it out; the groups keep their places.
The utility panel centers its title and keeps an icon strip.
| Part | Value |
|---|---|
| Icon slots | 44×30px on a 44px pitch |
| Selected slot | Radius-9 glass pill |
| Band | 65px, closed by a 1px rule at rgba(60, 60, 67, 0.12) |
Flat strip (.p-window-toolbar-flat) | 44×29px slots, radius 6px, selected slot filled at 3% |
The macOS 26 flat strip is still available: add .p-window-toolbar-flat to the toolbar row.
Traffic lights
The lights are real buttons, so label them (aria-label="Close") even in demos so screen readers get a name.
| Part | Value |
|---|---|
| Document lights | 14px on a 23px pitch: close #FF5C60, minimize #FAC800, zoom #35C759 |
| Utility lights | 10px on a 17px pitch, 12px from the left and 11px from the top |
| Ring | 0.5px, black at 45% in overlay blend, set by --p-traffic-close-ring, --p-traffic-min-ring and --p-traffic-zoom-ring |
When the window is inactive, all three lights turn rgba(0, 0, 0, 0.15), or rgba(255, 255, 255, 0.17) in dark mode, and the title drops to 50%.
Sidebar windows
For a sidebar window, add .p-window-split to the window and put a full-height sidebar first. The lights move into the sidebar’s header zone, at 19px from the top and left. An optional 36px round glass toggle sits 8px from the sidebar’s top and trailing edges. The main column (.p-window-main) holds its own titlebar, with the title 18px from the sidebar edge.
<div class="p-window p-window-split">
<nav class="p-sidebar p-sidebar-small" aria-label="Locations">
<div class="p-sidebar-titlebar">
<div class="p-traffic-lights">…</div>
<button class="p-toolbar-circle p-sidebar-toggle" aria-label="Hide sidebar">
<i class="ph-bold ph-sidebar-simple"></i>
</button>
</div>
<div class="p-sidebar-row p-selected">…</div>
</nav>
<div class="p-window-main">
<div class="p-window-titlebar p-window-titlebar-unified">
<div class="p-window-titlebar-row"><span class="p-window-title">Recents</span></div>
</div>
<div class="p-window-content">…</div>
</div>
</div>
Group boxes
A group box visually groups related content inside a window. .p-box is a radius-12 rectangle with a very faint fill: black at 1.5% (it reads as #FBFBFB on white), or white at 1.5% in dark mode. It has no border, shadow or title. If the group needs a label, put a .p-box-title above it (11px at weight 590, 50% ink). The fill almost disappears off pure white or #1E1E1E, so with prefers-contrast: more it rises to 5% and gains a 1px ring. boxes.css ships in both bundles.
Appearance
Dark mode
The surface becomes #1E1E1E, with a 1px inner rim of white at 20% on the window edge. The window shadow deepens to 57% (35% inactive). The band hairline becomes 10% white, and the title and proxy icon go to 85% white. Light colors do not change. Both .p-dark-mode and .p-auto-dark-mode are supported.
Code
<div class="p-window" style="width: 480px; height: 320px;">
<div class="p-window-titlebar">
<div class="p-window-titlebar-row">
<div class="p-traffic-lights">
<button class="p-traffic-light p-traffic-light-close" aria-label="Close"></button>
<button class="p-traffic-light p-traffic-light-min" aria-label="Minimize"></button>
<button class="p-traffic-light p-traffic-light-zoom" aria-label="Zoom"></button>
</div>
<div class="p-window-titles">
<span class="p-window-title">Project</span>
<span class="p-window-subtitle">Edited</span>
</div>
</div>
</div>
<div class="p-window-content">
<!-- app content -->
</div>
</div>
The window makes itself a backdrop root, so its band and glass only ever blur the window’s own content. With prefers-reduced-transparency the band turns opaque. Traffic lights show a 2px #64BAFF focus ring, and toolbar buttons show the standard ring, 3px rgb(0 122 255 / 50%).