---
title: "macOS Window"
description: "A macOS 26 app window with a title bar, unified toolbar, or compact toolbar, a floating sidebar, and real UI inside."
url: https://gelatinui.com/components/macos-window
markdown_url: https://gelatinui.com/components/macos-window.md
access: free
install: "npx shadcn@latest add @gelatin-ui/macos-window"
registry_item: https://gelatinui.com/r/macos-window.json
version: "2026-11-10"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# macOS Window

> A macOS 26 app window with a title bar, unified toolbar, or compact toolbar, a floating sidebar, and real UI inside.

Page: https://gelatinui.com/components/macos-window

## When to use it

Best for: A macOS 26 app window with a title bar or toolbar, around real UI.

- Use it for a desktop app page.
- Pass `sidebar` for the floating sidebar.
- Set `active={false}` for a window that is not in front.

## When not to use it

- For a Windows window, use a [Windows Window](https://gelatinui.com/components/windows-window.md).
- For a website, use a [Browser Window](https://gelatinui.com/components/browser-window.md).

## Notes for agents

- The corner radius follows the kind of chrome.
- With no content, the window is only its chrome unless it has a `height`.
- Compose `MacosWindowTitleBar` (with `MacosWindowHeading`, `MacosWindowTitle`, and `MacosWindowSubtitle`) and `MacosWindowContent`. `MacosWindowSidebar` must be a direct child of the root.
- The window is named by `MacosWindowTitle` while it is there, else by `aria-label`.

## Anatomy

```text
MacosWindow
├─ MacosWindowSidebar (0..n)
├─ MacosWindowTitleBar (0..n)
├─ MacosWindowTrafficLights (0..n)
├─ MacosWindowHeading (0..n)
├─ MacosWindowTitle (0..n)
├─ MacosWindowSubtitle (0..n)
├─ MacosWindowContent (0..n)
├─ MacosWindowToolbarGroup (0..n)
├─ MacosWindowSearch (0..n)
└─ MacosWindowMagnifier (0..n)
```

## API reference

### MacosWindow

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `active` | `boolean` | true |  |
| `kind` | `"compact" \| "titlebar" \| "toolbar"` | "titlebar" |  |
| `height` | `string \| number` |  | A fixed window height in px or any CSS length. Default: the bar plus the content. |
| `appearance` | `MockupAppearance` | "system" | The look of the chrome: the page theme (`system`), or always light or dark. |

### MacosWindowSidebar

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### MacosWindowTitleBar

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### MacosWindowTrafficLights

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `showGlyphs` | `boolean` |  |  |
| `size` | `"default" \| "sm"` |  |  |

### MacosWindowHeading

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### MacosWindowTitle

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### MacosWindowSubtitle

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### MacosWindowContent

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### MacosWindowToolbarGroup

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### MacosWindowSearch

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### MacosWindowMagnifier

No props of its own: `className`, `children`, and every other prop go to the element it renders.

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| MacosWindow | `macos-window` | `data-appearance` | `--macos-window-bar-start`, `--macos-window-content-start`, `--macos-window-field`, `--macos-window-field-shadow`, `--macos-window-glass`, `--macos-window-glass-shadow`, `--macos-window-icon`, `--macos-window-label`, `--macos-window-placeholder`, `--macos-window-search-icon`, `--macos-window-secondary`, `--macos-window-separator`, `--macos-window-shadow`, `--macos-window-sidebar`, `--macos-window-sidebar-shadow`, `--macos-window-surface`, `--macos-window-tertiary` |  |
| MacosWindowSidebar | `macos-window-sidebar` |  |  |  |
| MacosWindowTitleBar | `macos-window-title-bar` |  |  |  |
| MacosWindowTrafficLights | `macos-window-traffic-lights` |  |  |  |
| MacosWindowHeading | `macos-window-heading` |  |  |  |
| MacosWindowTitle | `macos-window-title` |  |  |  |
| MacosWindowSubtitle | `macos-window-subtitle` |  |  |  |
| MacosWindowContent | `macos-window-content` |  |  |  |
| MacosWindowToolbarGroup | `macos-window-toolbar-group` | `data-kind` | `--macos-window-glass`, `--macos-window-glass-shadow`, `--macos-window-icon` |  |
| MacosWindowSearch | `macos-window-search` | `data-kind` | `--macos-window-field`, `--macos-window-field-shadow`, `--macos-window-glass`, `--macos-window-glass-shadow`, `--macos-window-placeholder`, `--macos-window-search-icon` |  |
| MacosWindowMagnifier | `macos-window-magnifier` |  |  |  |

## Usage

Import macOS Window and compose its parts.

```tsx title="macos-window.tsx"
import {
  MacosWindow,
  MacosWindowContent,
  MacosWindowHeading,
  MacosWindowTitle,
  MacosWindowTitleBar,
} from "@/components/mockups/macos-window";

export function MacosWindowDemo() {
  return (
    <MacosWindow className="w-105 max-w-full">
      <MacosWindowTitleBar>
        <MacosWindowHeading>
          <MacosWindowTitle>Preview</MacosWindowTitle>
        </MacosWindowHeading>
      </MacosWindowTitleBar>
      <MacosWindowContent>Your app</MacosWindowContent>
    </MacosWindow>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/macos-window
```

It adds 15 registry items: 14 files, 1869 lines, and the npm packages `clsx`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [macOS Traffic Lights](https://gelatinui.com/components/macos-traffic-lights.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Browser Window](https://gelatinui.com/components/browser-window.md)
- [Windows Window](https://gelatinui.com/components/windows-window.md)
- [macOS Traffic Lights](https://gelatinui.com/components/macos-traffic-lights.md)

## Accessibility

The bar title is a picture, and the frame label names it.

The content stays real.
