Data display

Mockup

A browser or window frame around a screenshot, a video or any content.

Class nameTypeDescription
mockup-browserplf:mockup-browserComponentA browser frame with an address bar
mockup-windowplf:mockup-windowComponentA compact window frame with the three dots only
mockup-browser-toolbarplf:mockup-browser-toolbarPartThe bar with the three dots
mockup-browser-urlplf:mockup-browser-urlPartThe address, after its lock or an icon of yours
mockup-browser-sizesplf:mockup-browser-sizesPartViewport sizes at the end of the bar: radios with the values desktop, tablet and phone, each drawn with its icon

Browser

Give the screenshot a meaningful alt. The frame fills the width of its container and grows with its content; a long address ends in an ellipsis.

example.com
Dashboard with sales figures, a revenue chart and recent customers

Window

A frame without an address, with a compact bar and corners that suit a small mockup on a landing page; a width utility such as max-w-sm sets its width. In either frame a direct image, picture, video or iframe fills the width at its own ratio: export a screenshot at twice the width it shows, so it is never enlarged, and give it width and height, so the frame keeps its room while it loads. A height set on an image or video crops it from the top rather than stretching it.

Dashboard with sales figures, a revenue chart and recent customers

Viewport sizes

Radios in mockup-browser-sizes narrow the frame to a tablet’s or a phone’s width, with no script; a size wider than the frame’s container leaves it as it is. Below md (768px) the screen is that narrow already, so the sizes hide. A page in an iframe, as here, lays itself out for that width; an image scales down.

example.com

React

MockupBrowser and MockupWindow from @pelatform/react render these frames.

Prop Values Default
icon On MockupBrowserUrl, an SVG or icon class of yours in place of the lock The drawn lock

The browser’s parts are MockupBrowserToolbar, MockupBrowserUrl and MockupBrowserSizes, a radio group named Viewport size unless given another aria-label, around your radios; the props are a div’s own, className and ref included.

CSS variables

Override on a root or on a single frame. The browser’s bar, dots and corners get as compact as the window’s below sm (640px).

Variable Default
--plf-mockup-radius --plf-radius-2xl (16px) on the browser; --plf-radius-xl (12px) on the window, and on the browser below sm
--plf-mockup-border --plf-color-border-subtle, on the frame, the bar and the address
--plf-mockup-shadow --plf-shadow-xl
--plf-mockup-bg Elevated surface
--plf-mockup-bar-bg --plf-color-surface-hover
--plf-mockup-tablet-width, --plf-mockup-phone-width 768px and 375px, the width of the page inside the frame for each size
--plf-mockup-close, --plf-mockup-minimize, --plf-mockup-maximize --plf-red-500, --plf-amber-400 and --plf-green-500, the three dots

Built with Pelatform UIv0.1.0

Components

Getting started

Foundations

Components

Actions

Data display

Navigation

Feedback

Data input

Layout

Advanced

Integrations

Blocks

Application

Authentication

Icons