explaingit

pixelsign/html5-device-mockups

Analysis updated 2026-07-03

3,698CSSAudience · designerComplexity · 1/5LicenseSetup · easy

TLDR

Drop-in HTML and CSS device frames for 27 phones, tablets, and laptops so you can display screenshots or live apps inside realistic device mockups on any webpage.

Mindmap

mindmap
  root((html5-device-mockups))
    Devices
      iPhones and iPads
      Galaxy phones
      Macbook and iMac
      Surface and Chromebook
    Features
      Portrait and landscape
      Multiple color options
      Live content embed
    Use Cases
      Portfolio showcase
      Landing page mockup
      Video demo framing
    Setup
      npm or Bower install
      Link CSS file
      Copy HTML snippet
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Wrap a screenshot in an iPhone or Macbook frame for a portfolio or product landing page.

USE CASE 2

Embed a live JavaScript app or YouTube video inside a device frame to show it running in context.

USE CASE 3

Add a device mockup section to a marketing page using only a CSS file link and a short HTML snippet.

What is it built with?

CSSHTML

How does it compare?

pixelsign/html5-device-mockupsadobe-fonts/source-sansnicejade/markdown-online-editor
Stars3,6983,6923,683
LanguageCSSCSSCSS
Setup difficultyeasyeasyeasy
Complexity1/52/52/5
Audiencedesignerdesignerdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
MIT license, use freely in personal or commercial projects without restrictions.

In plain English

This project gives you ready-made device frames for phones, tablets, laptops, and desktop monitors that you can drop into any webpage. The frames are built from CSS and HTML, so they work in any browser without needing images to be swapped out manually. You put your own screenshot, video, or live app inside the frame, and it looks like it is running on a real device. The collection covers 27 different devices: iPhones going back to the iPhone 5 and up through the iPhone X, several iPad models, Galaxy phones and tablets, a Chromebook, a Macbook, an iMac, a Surface Pro, a Surface Studio, a Samsung TV, a Huawei P8, a Lumia 930, a Pixel, and an HTC One M8. Each device comes in the color options the real product shipped in, such as black, white, gold, pink, or red depending on the model. Most phones and tablets can be displayed in portrait or landscape orientation. The main use case is showing off an app or website in a portfolio or landing page. Instead of pasting a flat screenshot, you wrap it in one of these device frames so visitors can immediately picture it running on a real phone or laptop. You can also embed a live JavaScript app or a YouTube video inside the frame, so the device appears to be actively running something. Adding it to a project is straightforward. You can install it through npm or Bower with a single command, or just link the provided CSS file the traditional way. Then you add a short block of HTML, pick a device name, an orientation, and a color, and place your content inside the designated screen area. The README includes a working HTML snippet you can copy directly. The project is licensed under MIT, meaning you can use it in personal or commercial work without restrictions. It is a static, purely front-end library with no server component and no build step required beyond the CSS file.

Copy-paste prompts

Prompt 1
Using html5-device-mockups, write the HTML snippet to display my app screenshot inside an iPhone X in portrait mode with a black frame.
Prompt 2
Show me how to embed a YouTube iframe inside an html5-device-mockups Macbook frame so it looks like the video is playing on a laptop.
Prompt 3
Write a responsive CSS wrapper so the html5-device-mockups Galaxy S8 frame scales correctly on mobile and desktop screens.
Prompt 4
Give me the HTML to show my website in an html5-device-mockups iPad Pro landscape frame in white color.

Frequently asked questions

What is html5-device-mockups?

Drop-in HTML and CSS device frames for 27 phones, tablets, and laptops so you can display screenshots or live apps inside realistic device mockups on any webpage.

What language is html5-device-mockups written in?

Mainly CSS. The stack also includes CSS, HTML.

What license does html5-device-mockups use?

MIT license, use freely in personal or commercial projects without restrictions.

How hard is html5-device-mockups to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is html5-device-mockups for?

Mainly designer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub pixelsign on gitmyhub

Verify against the repo before relying on details.