Developers · Gutenberg

Browser Mockup block for WordPress

Display a realistic browser chrome window around a customizable mini page preview — perfect for product screenshots, UI demos, and tutorials.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Display a realistic browser chrome window around a customizable mini page preview — perfect for product screenshots, UI demos, and tutorials.

Inspector panels on this block: Browser Frame, Bookmarks, Page Sections (' + a.sections.length +, Frame Colors. Those titles come from index.js, not from a shared template.

Behavior controls: “Browser style” options: Chrome (light), Chrome (dark), Arc (sidebar), Minimal; “Type” options: Nav bar, Hero / Banner, Feature grid, Content / Text, CTA strip; “Title Font Weight” options: 400, 500, 600, 700.

Where to find it

Gutenberg inserter → Developers → search “Browser Mockup” (block name `blockenberg/browser-mockup` in block.json). Style it in the sidebar after insert.

How to use Browser Mockup block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Browser Mockup”, insert it. Category: Developers.
  3. Configure inspector controls that exist on this block. Open Browser Frame. Set “Browser style”, “URL”, “Tab title”, “Show tabs”.
  4. Check the published page. The view script reads HTML data attributes: data-opts, data-rendered. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Browser styleSelect control; the chosen value is saved on the block. Options: Chrome (light); Chrome (dark); Arc (sidebar); Minimal. block.json default: chrome. Saved as `browserStyle`.
URLText field in the inspector. block.json default: https://yoursite.com. Saved as `url`.
Tab titleText field in the inspector. block.json default: My Awesome App. Saved as `tabTitle`.
Show tabsOn/off toggle in the inspector. On by default. Saved as `showTabs`.
Show URL barOn/off toggle in the inspector. On by default. Saved as `showURL`.
Show bookmarks barOn/off toggle in the inspector. Off by default. Saved as `showBookmarks`.
Corner radiusNumeric range control in the inspector. Range 0–28. block.json default: 12. Saved as `borderRadius`.
TypeSelect control; the chosen value is saved on the block. Options: Nav bar; Hero / Banner; Feature grid; Content / Text; CTA strip; Footer. Saved as `sections`.
Label / textText field in the inspector. Saved as `sections`.
Height (px)Numeric range control in the inspector. Range 32–400. Saved as `sections`.
Font sizeNumeric range control in the inspector. Range 10–20. block.json default: 13. Saved as `fontSize`.
Title Font Size (px)Numeric range control in the inspector. Range 10–20. block.json default: 13. Saved as `titleFontSize`.
Title Font WeightSelect control; the chosen value is saved on the block. Options: 400; 500; 600; 700. Saved as `titleFontWeight`.
Title Line HeightNumeric range control in the inspector. Range 0.8–2.5. Saved as `titleLineHeight`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Browser Mockup block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Browser Mockup”. It sits under Developers. After insert, open Browser Frame and set “Browser style”, “URL”, “Tab title”, “Show tabs”.

What makes Browser Mockup different from other Blockenberg blocks?

Display a realistic browser chrome window around a customizable mini page preview — perfect for product screenshots, UI demos, and tutorials. Inspector labels on this block include “Browser style”, “URL”, “Tab title”, “Show tabs”.

Is the Browser Mockup Gutenberg block free?

Yes. Browser Mockup ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Browser Mockup to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Browser Frame, Bookmarks, Page Sections (' + a.sections.length +, Frame Colors).

Related developers blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Browser Mockup from the Gutenberg inserter.

Get Blockenberg