Ballmac UI home

Android Frame

A modern Android phone drawn in CSS: satin frame in porcelain, obsidian or sage, centered punch-hole camera, Material-style status bar and gesture or three-button navigation. Children render at phone resolution, scaled to fit.

Right-to-left: Hardware buttons and bezels sit on fixed physical edges of the device, so the frame keeps its shape; the screen content you place inside follows the page direction.

9:41

9:41

Thu, Oct 1 · 18°C

Search apps and the web

Design review

10:30 · Room 4B

Phone
Messages
Browser
Camera
Gmail
Maps
Music
Settings

Installation

$ pnpm dlx shadcn@latest add @ballmac/android-frame

Usage

import { AndroidFrame } from "@/components/ballmac/android-frame"

The full example is in the Code tab above.

Examples

Three-button navigation

9:41

Settings

Search settings
  • Network & internetWi-Fi, mobile, data usage
  • Connected devicesBluetooth, pairing
  • Battery82% · about 1 day left
  • DisplayDark theme, font size

API reference

PropTypeDefault
children

Screen content, laid out below the status bar. Ignored when `src` or `videoSrc` is set.

React.ReactNode—
variant

Finish of the frame. "auto" is porcelain in light mode and obsidian in dark mode.

"auto" | "porcelain" | "obsidian" | "sage""auto"
src

Image shown on the screen, cropped to fill it.

string—
alt

Alternative text for `src`.

string""
videoSrc

Video shown on the screen: muted, looping, and paused under reduced motion.

string—
poster

Poster image for `videoSrc`.

string—
screenWidth

Width in CSS pixels that the screen content is laid out at (412 matches a 6.3" phone); it is then scaled to fit. Omit to lay content out at the frame's actual size.

number—
statusBar

Show the status bar (time, signal, Wi-Fi, battery).

booleantrue
time

Time shown in the status bar.

string"9:41"
navigation

System navigation: the gesture pill, three buttons, or nothing.

"gesture" | "buttons" | "none""gesture"
screenClassName

Class names for the screen element (inside the bezel). Use "dark" to give the screen its own theme.

string—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
StaticPurely visual: no focusable elements from the frame
Reduced motionVideo on the screen is not autoplayed

Use with AI

Wrap a mobile screen in <AndroidFrame screenWidth={412}>: children render below a status bar at 412 CSS px wide and are scaled to the frame's width. Set the width with className (e.g. w-64). With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Android Frame (@ballmac/android-frame) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Showing an Android or responsive mobile app
  • Side by side with phone-frame for cross-platform stories

Not for

  • iPhone mockups (phone-frame)
  • Real device screenshots with a bezel

Registry JSON: https://ui.ballmac.com/r/android-frame.json

Credits

Free to use in personal and commercial projects.