---
title: "iPhone"
description: "An iPhone 18 Pro, 18 Pro Max, Air, or 17 frame drawn from Apple's drawings, at its real size. Put your app screen in it."
url: https://gelatinui.com/components/iphone
markdown_url: https://gelatinui.com/components/iphone.md
access: free
install: "npx shadcn@latest add @gelatin-ui/iphone"
registry_item: https://gelatinui.com/r/iphone.json
version: "2026-11-10"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# iPhone

> An iPhone 18 Pro, 18 Pro Max, Air, or 17 frame drawn from Apple's drawings, at its real size. Put your app screen in it.

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

## When to use it

Best for: A real iOS app screen in an iPhone frame that scales to its box.

- Use it to show a phone app on a marketing or docs page.
- Use `model` and `finish` to match the phone your users have.
- Pad the app with `--safe-area-*`, as with `env(safe-area-inset-*)` on the device.

## When not to use it

- For an Android phone, use the [Android Phone](https://gelatinui.com/components/android-phone.md).
- For a foldable phone, use the [iPhone Duo](https://gelatinui.com/components/iphone-duo.md).

## Notes for agents

- Compose `IphoneScreen` (the app) first, then `IosStatusBar`, `IphoneIsland`, and `IosHomeIndicator`. With no children, the frame shows its system UI at rest.
- An app put straight into `Iphone`, with no `IphoneScreen`, is not clipped to the screen.
- The screen is the real point size (402 pt on iPhone 18 Pro): the phone scales as a picture, so use container queries, not media queries, in the app.
- The hardware is a picture: screen readers skip it. The root is a figure named after the model, so the app keeps its own roles.

## Anatomy

```text
Iphone
├─ IphoneScreen (0..n)
└─ IphoneIsland (0..n)
```

## API reference

### Iphone

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `model` | `"17" \| "18-pro" \| "18-pro-max" \| "air"` | "18-pro" | The model: its size, island, and buttons. Default `18-pro`. |
| `finish` | `"black" \| "burgundy" \| "cloud-white" \| "glacier" \| "lavender" \| "light-gold" \| "mist-blue" \| "sage" \| "silver" \| "sky-blue" \| "space-black" \| "white"` |  | The band color. Default: the first finish of the model. |
| `orientation` | `"landscape" \| "portrait"` | "portrait" | `landscape` turns the phone left: the island is on the left, the side button at the top, and the Action and volume keys at the bottom. |

### IphoneScreen

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

### IphoneIsland

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

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| Iphone | `iphone` |  | `--device-band`, `--device-edge`, `--device-island-width`, `--device-middle`, `--device-rim`, `--iphone-island-height`, `--iphone-island-left`, `--iphone-island-top`, `--iphone-island-width` |  |
| IphoneScreen | `iphone-screen` |  |  |  |
| IphoneIsland | `iphone-island` |  | `--iphone-island-height`, `--iphone-island-left`, `--iphone-island-top`, `--iphone-island-width` |  |

## Usage

Put your app in the screen, then add the system UI on top.

```tsx title="phone-screenshot.tsx"
import { IosHomeIndicator, IosStatusBar } from "@/components/mockups/ios-status-bar";
import { Iphone, IphoneIsland, IphoneScreen } from "@/components/mockups/iphone";

export function PhoneScreenshot() {
  return (
    <Iphone model="18-pro" finish="silver" className="w-72">
      <IphoneScreen>
        <div className="size-full bg-white pt-(--safe-area-top)">Your app</div>
      </IphoneScreen>
      <IosStatusBar glyphs="dark" />
      <IphoneIsland />
      <IosHomeIndicator />
    </Iphone>
  );
}
```

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

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

## Built on

- [Device Frame](https://gelatinui.com/components/device-frame.md)
- [iOS Status Bar](https://gelatinui.com/components/ios-status-bar.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

- [iPhone Duo](https://gelatinui.com/components/iphone-duo.md)
- [iPad](https://gelatinui.com/components/ipad.md)
- [iOS Status Bar](https://gelatinui.com/components/ios-status-bar.md)
- [Android Phone](https://gelatinui.com/components/android-phone.md)
- [Device Frame](https://gelatinui.com/components/device-frame.md)

## Accessibility

The hardware and the system UI are hidden from screen readers. The app on the screen is read.

The root is a figure named after the model. Set `aria-label` to name it after your app.
