Window Chrome
ASecurityDesign and fix the window frame of a web-built desktop app (Tauri, Electron) — title bar style per OS, hidden or overlay title bars, drag regions, macOS traffic-light position and fullscreen gutter, Windows caption buttons and Windows 11 Snap Layouts, native materials (vibrancy, Mica, Liquid Glass) instead of CSS blur, transparent windows, minimum size, remembered size and position, native title bar following the app theme, shadow and rounded corners on frameless Windows windows. Use when rem...
- 2 stars
- 0 votes
- 0 copies
- 2 views
- Added December 3, 2026
Works with
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add agmmnn/desktop-feel --skill window-chrome --agent claude-codeAre you the author of Window Chrome?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/agmmnn-window-chrome)---
name: window-chrome
description: Design and fix the window frame of a web-built desktop app (Tauri, Electron) — title bar style per OS, hidden or overlay title bars, drag regions, macOS traffic-light position and fullscreen gutter, Windows caption buttons and Windows 11 Snap Layouts, native materials (vibrancy, Mica, Liquid Glass) instead of CSS blur, transparent windows, minimum size, remembered size and position, native title bar following the app theme, shadow and rounded corners on frameless Windows windows. Use when removing or customizing the title bar, when the window can't be dragged, when traffic lights are misaligned, when Snap Layouts are missing, or when adding a frosted sidebar. For the content inside the window use desktop-native.
---
# Window Chrome
## Initial Response
When this skill is first invoked without a specific question, respond only with:
> Ready to work on your window frame. Tell me which OSes you ship to and what you want the title bar to look like.
A build-and-fix skill for the frame around the web view: title bar, window controls, drag regions, materials, size and state. It does not touch what's inside the window (`desktop-native`) or menus (`native-menus`).
## Operating Posture
The window frame is where web-built apps lose the most native behavior for the least visual gain. A custom title bar looks good in a screenshot and costs Snap Layouts, double-click-to-zoom, correct drag behavior and OS-version-correct button sizes.
Two failure modes, and the first is worse:
1. **One frame for all platforms.** `decorations: false` plus HTML buttons everywhere. It is the easiest config and the worst result on Windows and Linux.
2. **Faking the OS.** Drawing traffic lights in HTML, blurring the sidebar with `backdrop-filter`. The OS draws these better, cheaper and correctly across versions.
## Hard Rules
1. **Decide per OS.** macOS, Windows and Linux have different native options; the decision table below is the starting point. Use platform-specific config files rather than one compromise.
2. **Keep native controls when the shell allows it.** Draw window buttons yourself only when there is no native way to get the layout, and say what is lost.
3. **Materials come from the OS.** Vibrancy, Mica and Liquid Glass are window effects, not CSS.
4. **Every frameless window must be draggable, resizable and maximizable** the way the OS does it.
5. **Shell code lives in [TAURI.md](TAURI.md).** Read it when `src-tauri/` exists. If the project uses Electron (an `electron` dependency, a main-process file that creates `BrowserWindow`), there is no ELECTRON.md yet: apply the shell-agnostic fixes in this file, and for shell-level fixes use only Electron APIs you can confirm against the installed version: its type definitions (`node_modules/electron/electron.d.ts`) first, then its docs. Name the version you checked, and mark anything you couldn't confirm as verify in the output. In Electron, prefer `titleBarOverlay` over HTML caption buttons on Windows and Linux.
## Decision Table
What to do per OS when the design wants content up into the title bar.
| OS | Recommended | What it keeps | What it costs |
| --- | --- | --- | --- |
| macOS | Overlay title bar, hidden title, positioned traffic lights | Native traffic lights, zoom on double-click (OS setting), fullscreen button | Can't drag the window while it's unfocused (Tauri limitation, WC-07) |
| Windows | Keep native decorations, or a snap-layout plugin with custom caption buttons | Snap Layouts, native button sizes and hover, Aero Snap | Native: no content in the title bar. Plugin: an extra dependency to maintain |
| Linux | Keep native decorations | The window manager's own frame, which users configured | No content in the title bar |
Electron has `titleBarOverlay` for native caption buttons on Windows and Linux; Tauri v2 does not (tracked upstream), which is why Windows has no clean "overlay" row here.
## The Symptom Table
| Problem | Solution | Rule |
| --- | --- | --- |
| Same frameless setup on every OS | Platform-specific config | WC-01 |
| Can't drag the window | Drag region + permission | WC-02 |
| Buttons in the title bar drag instead of click | Opt controls out of the drag region | WC-03 |
| Traffic lights don't line up with the toolbar | `trafficLightPosition` + matching padding | WC-04 |
| Empty gap where traffic lights were, in fullscreen | Remove the gutter in fullscreen | WC-05 |
| No Snap Layouts on the maximize button | Native decorations or a snap-layout plugin | WC-06 |
| Window won't drag until clicked once | Known Overlay limitation | WC-07 |
| Frosted sidebar is slow / looks flat | Window effects, not `backdrop-filter` | WC-08 |
| "Transparent" window is still opaque | Transparent `html` and `body`, macOS private API | WC-09 |
| Window shrinks until the layout breaks | Minimum size | WC-10 |
| Window opens at the same size every time | Remember size and position | WC-11 |
| Dark app with a light title bar | Set the native window theme | WC-12 |
| First click on an inactive palette is swallowed | Decide `acceptFirstMouse` | WC-13 |
| Double-clicking the custom title bar does nothing | Toggle maximize on double-click | WC-14 |
| Frameless Windows window is a flat rectangle, or has a stray white line | Keep the system shadow, design for its border | WC-15 |
## The Fixes
### WC-01 Title bar strategy per OS
Apply the decision table through per-platform config files so each OS gets its own frame. Never ship `decorations: false` to all three platforms by default. Code: [TAURI.md](TAURI.md#wc-01).
### WC-02 A frameless window can be dragged
Without a native title bar, nothing moves the window until you mark a drag region. The region must cover the empty title-bar area, at the height the OS uses (about 28px on macOS with Overlay, more with a toolbar; 32px on Windows). The shell also needs permission to start a drag. Code: [TAURI.md](TAURI.md#wc-02).
### WC-03 Controls inside a drag region still work
A button inside the drag region starts a window drag instead of a click, or works only sometimes. Interactive elements in the title bar (tabs, search, buttons) must not be part of the region. Mark only the background, or opt controls out. Code: [TAURI.md](TAURI.md#wc-02).
### WC-04 Traffic lights align with the toolbar
With an overlay title bar, the traffic lights sit at the OS default position, which rarely matches a taller custom toolbar. Move them to the toolbar's vertical center and leave left padding so content doesn't run under them. The padding must match the buttons' actual width (about 70–80px including inset, verify on macOS).
```css
.titlebar { height: 52px; padding-left: 78px; }
```
Code: [TAURI.md](TAURI.md#wc-04).
### WC-05 No empty traffic-light gutter in fullscreen
In fullscreen the traffic lights hide, but the left padding stays and the toolbar looks broken. Track fullscreen and drop the padding.
```css
:root[data-fullscreen="true"] .titlebar { padding-left: 12px; }
```
Code: [TAURI.md](TAURI.md#wc-05).
### WC-06 Windows caption buttons keep Snap Layouts — or the loss is deliberate
On Windows 11, hovering the maximize button shows Snap Layouts. That flyout appears only when the window answers the OS hit test with "this is the maximize button" (`HTMAXBUTTON`). HTML buttons can't answer it, so a custom caption bar drawn in HTML loses Snap Layouts, and no frontend code brings it back.
Options, in order of preference:
1. Keep native decorations on Windows.
2. Use a plugin that places a native hit-test region over your custom maximize button (see [TAURI.md](TAURI.md#wc-06)).
3. Draw your own buttons and accept the loss — state it in the PR.
Custom buttons also need the Windows sizes: 46×32px each, close button hover `#c42b1c` with white glyph, right-aligned, order minimize / maximize / close.
### WC-07 Overlay windows can't be dragged while unfocused
A Tauri limitation: with `titleBarStyle: "Overlay"`, dragging the title area of an inactive window does nothing until it is focused (tauri#4316). There is no CSS fix. Note it when choosing Overlay; don't try to fix it with click handlers.
### WC-08 Materials come from the OS
A sidebar with `backdrop-filter: blur(30px)` over a solid window background blurs nothing useful, costs paint time (badly on Linux, WQ-02), and doesn't match the OS material. Use window effects: macOS vibrancy (`sidebar`, `underWindowBackground`, Liquid Glass on macOS 26+), Windows 11 Mica/Tabbed/Acrylic. Let the web view be transparent where the material should show.
Respect `prefers-reduced-transparency`: give the sidebar an opaque background under that query. Code: [TAURI.md](TAURI.md#wc-08).
### WC-09 Transparent windows are actually transparent
`transparent: true` on the window is not enough. Both `html` and `body` (and the framework root) must have a transparent background, and macOS needs the private API flag. Missing any of these gives an opaque window.
```css
html, body, #root { background: transparent; }
```
Code: [TAURI.md](TAURI.md#wc-09).
### WC-10 Minimum window size
Without a minimum, the window shrinks until the sidebar overlaps content and toolbars wrap. Set a minimum that fits the narrowest supported layout, and make the layout collapse (sidebar hidden, toolbar overflow) above that width, not break. Windows 11 Snap Layouts need windows that can shrink to a half or third of the screen; a huge minimum blocks snapping. Code: [TAURI.md](TAURI.md#wc-10).
### WC-11 Remember size and position
Native apps reopen where you left them. Persist size, position, maximized and fullscreen state, and clamp to visible monitors (a monitor may have been unplugged). Code: [TAURI.md](TAURI.md#wc-11).
### WC-12 Native title bar follows the app theme
When the app has its own light/dark toggle, the native title bar and caption buttons keep following the OS. A dark app with a white title bar looks broken. Set the native window theme whenever the app theme changes; when the app follows the system, leave the native theme on system. Code: [TAURI.md](TAURI.md#wc-12).
### WC-13 First click on an inactive window
On macOS, the first click on an inactive window normally only activates it. For main windows that's right. For tool palettes and floating panels, users expect the first click to act. Decide per window. Code: [TAURI.md](TAURI.md#wc-13).
### WC-14 Double-click on a custom title bar
Double-clicking a native title bar maximizes (Windows) or zooms/minimizes per the user's setting (macOS). A custom title bar that does nothing on double-click feels dead. With an Overlay title bar on macOS the OS still handles it; for fully custom bars, toggle maximize on double-click of the drag region. Code: [TAURI.md](TAURI.md#wc-14).
### WC-15 Frameless windows on Windows keep their shadow and corners
A Windows window without decorations can lose the system shadow and Windows 11's rounded corners, leaving a flat rectangle that doesn't separate from what's behind it. With the system shadow on, Windows draws a 1px border around the window, and the border is light by default, which shows as a stray line in a dark theme. Keep the shadow and design for the border: check it in both themes, and make sure the app's background reaches every edge so the border sits against the app, not against a gap. Linux doesn't support the setting. Code: [TAURI.md](TAURI.md#wc-15).
## Never Ship
| Never | Instead |
| --- | --- |
| `decorations: false` on every OS by default | Per-OS frame from the decision table |
| HTML traffic lights on macOS | Overlay title bar with native buttons |
| Custom Windows caption buttons without mentioning Snap Layouts | Native decorations, a snap-layout plugin, or a stated trade-off |
| Interactive controls inside the drag region | Region on the background only |
| `backdrop-filter` imitating vibrancy or Mica | Window effects |
| Transparent window with an opaque `body` | Transparent `html`, `body`, root |
| Fixed traffic-light padding in fullscreen | Padding tied to fullscreen state |
| No minimum window size | `minWidth` / `minHeight` that fit the layout |
| In-app dark mode with a light native title bar | Native window theme in sync |
| `shadow: false` on a frameless Windows window | System shadow and rounded corners kept |
## Output
Apply the changes, then:
| Rule | File | Change | Verified |
| --- | --- | --- | --- |
List per OS what must be checked in the running app (drag, double-click, snap, fullscreen, theme switch). Window chrome is almost never verifiable from code alone; say so.
Files in this skill
- SKILL.md
- TAURI.md
Attribution
Related skills
View all in design →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.