iPhone Mockup

Pro

A thick, extruded iPhone with a machined side rail, side buttons, and lock screen.

css 3dillustrationiphonephonemockupdevice3dcss
iPhone Mockup component preview

Overview

iPhone Mockup is a React and Tailwind CSS phone mockup for app landing pages, in Next.js or any React app, built in pure CSS 3D to iPhone 17 Pro proportions. The body is extruded, so turning it reveals real thickness, the side buttons, Camera Control, and a bottom rail with USB-C and speaker holes. Your wallpaper sits under an editable lock screen with Dynamic Island, clock, and date. Rotate, tilt, and five finishes are props, and the phone resizes to fit its parent. Hide the lock screen for app screenshots, and use portrait images, since the screen crops to fill.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add iphone-mockup

Usage

Import IphoneMockup from @/components/wensity/iphone-mockup and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import { IphoneMockup } from "@/components/wensity/iphone-mockup";
export default function Example() {
return (
<IphoneMockup
theme="cosmic-orange"
src="/screenshot.webp"
className="w-full max-w-[260px]"
/>
);
}

Props

PropTypeDefaultDescription
theme"cosmic-orange" | "deep-blue" | "silver" | "black" | "wensity-red""cosmic-orange"Chassis theme: Apple's Cosmic Orange, Deep Blue, or Silver finishes, plus custom Black and Wensity Red.
rotatenumber-22Yaw in degrees. Negative swings the right rail (side button, Camera Control) toward the viewer; 0 reads dead-on and hides the thickness.
tiltnumber6Pitch in degrees. Positive tips the top away so the bottom rail — speaker grille and USB-C — comes into view.
srcstring-Wallpaper shown on the display (fills the screen, object-cover).
timestring"9:41"Lock-screen clock, also shown in the status bar.
datestring"Wednesday, August 12"Date line above the lock-screen clock.
showLockScreenbooleantrueRender the lock-screen furniture. Turn off to show a wallpaper or screenshot unobstructed.
screenAltstring"Wallpaper"Alt text for the wallpaper image.
labelstring"iPhone Mockup illustration"Accessible label announced for the illustration.

Featured in React 3D components.