---
title: "MacBook"
description: "A MacBook Pro or Air frame seen from the front, with the notch or the Dynamic Island, a macOS menu bar, and a true-size screen."
url: https://gelatinui.com/components/macbook
markdown_url: https://gelatinui.com/components/macbook.md
access: free
install: "npx shadcn@latest add @gelatin-ui/macbook"
registry_item: https://gelatinui.com/r/macbook.json
version: "2026-11-10"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# MacBook

> A MacBook Pro or Air frame seen from the front, with the notch or the Dynamic Island, a macOS menu bar, and a true-size screen.

Page: https://gelatinui.com/components/macbook

## When to use it

Best for: A real desktop app or web page on a MacBook screen, with the macOS menu bar.

- Use `MacbookMenu app` for the bold app name, then one `MacbookMenu` per menu.
- Use a PROLED model (`pro-14-oled`, `pro-16-oled`) to show a live activity in `MacbookIsland`.

## When not to use it

- For one app window with no laptop, use the [macOS Window](https://gelatinui.com/components/macos-window.md).
- For a web page in a browser frame, use the [Browser Window](https://gelatinui.com/components/browser-window.md).

## Notes for agents

- Compose `MacbookScreen` first, then `MacbookMenuBar` with `MacbookMenu` parts, and `MacbookIsland` on PROLED models.
- The screen keeps 37 pt at the top for the menu bar (`--safe-area-top`), with or without it.
- Apple publishes no Mac drawings: the notch width, the island, and the lid corners are estimated.

## Anatomy

```text
Macbook
├─ MacbookScreen (0..n)
├─ MacbookMenuBar (0..n)
├─ MacbookMenu (0..n)
└─ MacbookIsland (0..n)
```

## API reference

### Macbook

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `model` | `"air-13" \| "air-15" \| "pro-14" \| "pro-14-oled" \| "pro-16" \| "pro-16-oled"` | "pro-14" | The model: its size, and a notch or (PROLED) a Dynamic Island. Default `pro-14`. |
| `finish` | `"midnight" \| "silver" \| "sky-blue" \| "space-black" \| "starlight"` |  | The lid and base color. Default: the first finish of the model line. |

### MacbookScreen

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

### MacbookMenuBar

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `glyphs` | `"dark" \| "light"` | "dark" | `dark` (default): dark text for a light wallpaper. `light`: light text for a dark one. |
| `time` | `string` | "Sat Oct 31 9:41 AM" | The clock at the right end. Default "Sat Oct 31 9:41 AM". |

### MacbookMenu

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `app` | `boolean` | false | The app name after the Apple menu: bold, as macOS draws it. |

### MacbookIsland

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

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| Macbook | `macbook` |  | `--device-base-bottom`, `--device-base-middle`, `--device-base-top`, `--device-hinge`, `--device-lid-bottom`, `--device-lid-top`, `--device-line`, `--device-rim`, `--device-thumb`, `--macbook-camera-width` |  |
| MacbookScreen | `macbook-screen` |  |  |  |
| MacbookMenuBar | `macbook-menu-bar` |  | `--macbook-camera-width` |  |
| MacbookMenu | `macbook-menu` |  |  |  |
| MacbookIsland | `macbook-island` |  |  |  |

## Usage

Put your desktop in the screen, then add the menu bar.

```tsx title="laptop-screenshot.tsx"
import {
  Macbook,
  MacbookMenu,
  MacbookMenuBar,
  MacbookScreen,
} from "@/components/mockups/macbook";

export function LaptopScreenshot() {
  return (
    <Macbook model="pro-14" className="w-full max-w-3xl">
      <MacbookScreen>
        <div className="size-full bg-[#F5F5F7] pt-(--safe-area-top)">Your app</div>
      </MacbookScreen>
      <MacbookMenuBar glyphs="dark">
        <MacbookMenu app>Northwind</MacbookMenu>
        <MacbookMenu>File</MacbookMenu>
        <MacbookMenu>Edit</MacbookMenu>
      </MacbookMenuBar>
    </Macbook>
  );
}
```

## 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/macbook
```

It adds 7 registry items: 7 files, 937 lines, and the npm packages `clsx`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Device Frame](https://gelatinui.com/components/device-frame.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

- [iPad](https://gelatinui.com/components/ipad.md)
- [macOS Window](https://gelatinui.com/components/macos-window.md)
- [Browser Window](https://gelatinui.com/components/browser-window.md)
- [Device Frame](https://gelatinui.com/components/device-frame.md)

## Accessibility

The laptop, the menu bar, and the island are hidden from screen readers. The app on the screen is read.
