iPhone Duo

A responsive iPhone Duo frame component that wraps any content inside a realistic foldable iPhone display, with front, back and open views.

iphone-duo-01

iphone-duo-02

iphone-duo-03

iphone-duo-04

iphone-duo-05

iphone-duo-06

iphone-duo-07

Installation

pnpm dlx shadcn@latest add https://designali.com/r/iphone-duo.json

Usage

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

Size

<IPhoneDuo size="lg">
  <div className="p-6">Large iPhone Duo</div>
</IPhoneDuo>

Orientation

<IPhoneDuo orientation="landscape">
  <div className="p-6">Landscape iPhone Duo</div>
</IPhoneDuo>

Side

<IPhoneDuo side="back" />
<IPhoneDuo side="frontback" className="h-[28rem] w-auto" />

Color

<IPhoneDuo color="star-white">
  <div className="p-6">Star White iPhone Duo</div>
</IPhoneDuo>

Custom frame image

<IPhoneDuo>
  <div className="p-6">Custom frame</div>
</IPhoneDuo>

Props

PropTypeDefault
childrenReactNode—
classNamestring—
size"sm" | "md" | "lg" | "xl""md"
orientation"portrait" | "landscape""portrait"
side"front" | "back" | "frontback""front"
color"night-sky" | "star-white""night-sky"

Notes

  • The screen area is an absolutely positioned container, so children scroll vertically inside it when they overflow.
  • children are only rendered when side="front". The back and frontback views show the frame image only.
  • orientation is ignored when side="frontback".
  • With side="frontback", no size or aspect ratio classes are applied, so you must set the dimensions yourself with className (for example h-[28rem] w-auto).
  • Passing image overrides side, orientation and color for the frame.