Components/Media/Preview
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/browserpreviewwidget
Browser preview widget enables users to see how their site will look like when opened in a web browser.
<MobilePreviewWidget/> instead).<SocialPreview/> or <SocialPostPreview/> instead).<GooglePreview/> instead).Component consists of preview content area and a browser bar:
children.Change the background style with skin prop:
neutral (default) in all common cases.gradient for larger preview areas.custom to set the backgroundColor to any color using design system color tokens, RGB or HEX formats.Control the height of the browser bar with browserBarSize prop, depending on the preview area width:
size9 when preview's width is <312 px.size12 (default) when width is 312–443 px.size18 when width is 444–660 px.size24 when width is >660 px.Control dimensions of the component by setting width and height props to custom % or px.
Use browser preview widget to showcase a design prepared by or suggested for the user.
It is often used together with <MobilePreviewWidget/> preview.
Use browser preview widget to validate if the selected site is the one the user wants to proceed with.
| Name | Type | Default | Description |
|---|---|---|---|
backgroundColor | string | — | 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. |
dataHook | string | — | Applied as data-hook HTML attribute that can be used in the tests. |
height | string | '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. |
width | string | '100%' | Sets the width of the component. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
Last updated: 21 October 2026