iPad

A responsive iPad frame component that wraps any content inside a realistic iPad Pro or iPad Air display, with portrait and landscape orientations.

ipad-01

ipad-02

ipad-03

ipad-04

ipad-05

ipad-06

ipad-07

ipad-08

ipad-09

ipad-10

Installation

pnpm dlx shadcn@latest add https://designali.com/r/ipad.json

Usage

import { IPad } from "@/components/ui/ipad"
<IPad>
  <div className="p-6">Your content here</div>
</IPad>

Variant

<IPad variant="ipad-air" color="blue">
  <div className="p-6">iPad Air</div>
</IPad>

Orientation

<IPad orientation="landscape">
  <div className="p-6">Landscape iPad</div>
</IPad>

Size

<IPad size="lg">
  <div className="p-6">Large iPad</div>
</IPad>

Color

<IPad variant="ipad-pro" color="black">
  <div className="p-6">Space Black iPad Pro</div>
</IPad>

Custom frame image

<IPad
        variant="ipad-air"
        color="blue"
        size="lg"
      >
        <img
          src="/img/login-1.jpg"
          alt="App screen"
          className="h-full w-full object-cover"
        />
      </IPad>

Props

PropTypeDefault
childrenReactNode—
classNamestring—
variant"ipad-pro" | "ipad-air""ipad-pro"
size"sm" | "md" | "lg" | "xl""md"
orientation"portrait" | "landscape""portrait"
color"black" | "silver" | "purple" | "space-grey" | "starlight" | "blue""silver"

Available colors

VariantColors
ipad-problack, silver
ipad-airpurple, space-grey, starlight, blue

Notes

  • The screen area is an absolutely positioned container, so children scroll vertically inside it when they overflow.
  • The iPad is sized by height, and the width follows from the aspect ratio (3/4 in portrait, 4/3 in landscape).
  • If the selected color isn't available for the chosen variant, the first color of that variant is used. For example, variant="ipad-air" with the default silver falls back to purple.
  • Passing image overrides both variant and color.