---
title: "macOS Traffic Lights"
description: "The close, minimize, and zoom buttons of a macOS window, with marks on hover and the grey of an inactive window."
url: https://gelatinui.com/components/macos-traffic-lights
markdown_url: https://gelatinui.com/components/macos-traffic-lights.md
access: free
install: "npx shadcn@latest add @gelatin-ui/macos-traffic-lights"
registry_item: https://gelatinui.com/r/macos-traffic-lights.json
version: "2026-11-10"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# macOS Traffic Lights

> The close, minimize, and zoom buttons of a macOS window, with marks on hover and the grey of an inactive window.

Page: https://gelatinui.com/components/macos-traffic-lights

## When to use it

Best for: A picture of the close, minimize, and zoom dots of a macOS window.

- Use it in a title bar mockup.
- Set `size` for 14pt or 12pt dots.
- Set `state` to pin one look.

## When not to use it

- For a full frame, use a [macOS Window](https://gelatinui.com/components/macos-window.md).

## Notes for agents

- These are pictures of system UI. They do nothing.

## Anatomy

```text
MacosTrafficLights
```

## API reference

### MacosTrafficLights

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `showGlyphs` | `boolean` |  |  |
| `size` | `"default" \| "sm"` |  |  |
| `state` | `"active" \| "inactive"` | "active" |  |
| `appearance` | `MockupAppearance` | "system" | The look of the inactive gray: the page theme (`system`), or always light or dark. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| MacosTrafficLights | `macos-traffic-lights` | `data-appearance` | `--macos-traffic-lights-inactive`, `--macos-traffic-lights-inactive-rim` | `motion-timing` |

## Usage

Import macOS Traffic Lights and compose its parts.

```tsx title="macos-traffic-lights.tsx"
import { MacosTrafficLights } from "@/components/mockups/macos-traffic-lights";

export function MacosTrafficLightsDemo() {
  return (
    <MacosTrafficLights />
  );
}
```

## 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-traffic-lights
```

It adds 4 registry items: 3 files, 1025 lines, and the npm packages `tailwind-merge`, `tailwind-variants`.

## 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)

## Accessibility

Screen readers skip it.

## Motion

| Part | Motion |
| --- | --- |
| Glyphs | hover · 120ms · the glyphs show on a hover |
