Skip to content

    Browse components

    iPhone Mockup

    A realistic, pure-CSS titanium phone frame with dynamic island, side buttons, status bar and a moving glass glare that tilts toward the pointer. Renders any children or an image as the screen.

    Open
    Customize
    natural
    black
    white
    blue
    desert
    light
    dark
    none

    Installation

    npx shadcn@latest add @glint-ui/iphone-mockup

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/iphone-mockup.json

    Usage

    import { IphoneMockup } from "@/components/ui/iphone-mockup";
    
    <IphoneMockup color="natural" width={300}>
      <YourAppScreen />
    </IphoneMockup>
    
    <IphoneMockup src="/screenshot.png" alt="App home screen" tilt={false} />

    Props

    PropTypeDefaultDescription
    color"natural" | "black" | "white" | "blue" | "desert""natural"Titanium finish.
    widthnumber300Rendered width in px; everything scales.
    tiltbooleantrueTilt toward the pointer in 3D.
    tiltAmountnumber14Max tilt in degrees.
    glarebooleantrueDiagonal glass reflection.
    statusBar"light" | "dark" | "none""light"Status bar tone, or hide it.
    timestring"9:41"Status bar time.
    srcstring—Screen image URL (when no children).
    childrenReactNode—Any screen content. Fills the screen.
    classNamestring—Extra classes for the root element.