BrowserPreviewWidget

Components/Media/Preview

Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/browserpreviewwidget

Overview

Copy

Browser preview widget enables users to see how their site will look like when opened in a web browser.

Do

  • Use it to show how a user's site or other content will appear in a web browser.
  • Use it to show how user-controlled settings look like in a published website.

Don't

  • Don't use it to preview content on mobile devices (use <MobilePreviewWidget/> instead).
  • Don't use it to show how a website's URL appears on social media (use <SocialPreview/> or <SocialPostPreview/> instead).
  • Don't use it to show how a site appears on Google search results (use <GooglePreview/> instead).

Feature examples

Structure

Component consists of preview content area and a browser bar:

  • Preview content area displays any type of content, like an image, text, or video. Add it inside the component as its children.
  • A styled browser bar is added at the top by default.
Copy

Skin

Change the background style with skin prop:

  • Use neutral (default) in all common cases.
  • Use gradient for larger preview areas.
  • Use custom to set the backgroundColor to any color using design system color tokens, RGB or HEX formats.
Copy

Browser bar size

Control the height of the browser bar with browserBarSize prop, depending on the preview area width:

  • Use size9 when preview's width is <312 px.
  • Use size12 (default) when width is 312–443 px.
  • Use size18 when width is 444–660 px.
  • Use size24 when width is >660 px.
Copy

Width and height

Control dimensions of the component by setting width and height props to custom % or px.

Copy

Common use case examples

Site previews

Use browser preview widget to showcase a design prepared by or suggested for the user.

It is often used together with <MobilePreviewWidget/> preview.

Copy

Selected page validation

Use browser preview widget to validate if the selected site is the one the user wants to proceed with.

Copy

Code

Copy

Props

NameTypeDefaultDescription
backgroundColorstring—Mobile preview widget background color. Can be set with design system colors.
browserBarSize"size24" | "size18" | "size9" | "size12"'size12'Browser bar height.
children (required)ReactNode—Node to preview.
dataHookstring—Applied as data-hook HTML attribute that can be used in the tests.
heightstring'100%'Sets the height of the component.
skin"neutral" | "gradient" | "custom"'neutral'Background skin. To use custom skin, set it to custom and use the backgroundColor prop.
widthstring'100%'Sets the width of the component.

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
existsChecks whether the component found with the given data hook.
elementGets the component root element.
clickClicks on the component root element.
baseReturns UniDriver for the base element.

Changelog

  • 1.339.0 (2026-10-19) — maintenance release, no component-specific changes
  • 1.338.0 (2026-10-15) — maintenance release, no component-specific changes
  • 1.325.0 (2026-09-17) — maintenance release, no component-specific changes
  • 1.324.0 (2026-09-14) — maintenance release, no component-specific changes
  • 1.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.292.0 (2026-06-22) — maintenance release, no component-specific changes
  • 1.291.0 (2026-06-19) — maintenance release, no component-specific changes
  • 1.268.0 (2026-04-13) — maintenance release, no component-specific changes
  • 1.266.0 (2026-04-07) — maintenance release, no component-specific changes
  • 1.260.0 (2026-03-17) — maintenance release, no component-specific changes
  • 1.250.0 (2026-01-27) — maintenance release, no component-specific changes
  • 1.115.0 (2024-07-17) — maintenance release, no component-specific changes
  • 1.102.0 (2024-04-16) — maintenance release, no component-specific changes
  • 1.93.0 (2024-02-08) — maintenance release, no component-specific changes
  • 1.92.1 (2024-02-05) — maintenance release, no component-specific changes

Last updated: 21 October 2026

Did this help?