Components/Media/Preview/PreviewWidget
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/previewwidget
Preview widget allows users to preview how content appears on a separate window. It is often used to illustrate how designs look on the web, without putting it into the frames of specific devices.
<BrowserPreviewWidget/> instead.<MobilePreviewWidget/> instead.<SocialPreview/> instead.Preview widget consists of a preview content area placed on a background that emphasises it.
Preview content area is an empty container that accepts any kind of content (text, image or other) as a child item.
Change the color of the background with `skin` and `backgroundColor` props. It supports 3 skins:
 - `neutral` (default) - use in all common cases.
 - `gradient` - use for larger preview areas.
 - `custom` - use it to specify a custom background color. Use a `backgroundColor` prop to set the exact background color value from WSR system colors.
Change the content outline with `contentOutline` prop. It supports 3 options:
 - `shadow` (default).
 - `border` - use it to frame the content area with a gray 1px border.
 - `none` - use it to display the content area without an outline.
Control the dimensions of the component using `height` and `width` props. Both `width` and `height` can be set to custom value in % or px.
Default value for `width` is 100%, while `height` is `auto` - component height adjusts to the height of content in the content area.
Support scroll for overflowed content with `scrollable` prop. Default value for `scrollable` is `false`.
Preview widget lets the users preview their website designs / templates / other content on a separate mock window.
The component illustrates how content looks like on the website while changing its settings in real-time.
| Name | Type | Default | Description |
|---|---|---|---|
backgroundColor | string | — | Sets the content area background color, as a HEX code. Accepts custom colors from the Wix Design System color palette. |
children (required) | ReactNode | — | Sets the main preview content. Accepts an image, text paragraph or any other custom element. |
contentOutline | "border" | "none" | "shadow" | 'shadow' | Sets the content outline as shadow (default), border or none |
dataHook | string | — | Applies a data-hook HTML attribute to be used in the tests. |
height | string | 'auto' | Adjusts the height of the component or can be set in specific % or px. |
scrollable | boolean | false | Enables vertical scroll of the overflowed content *. |
skin | "neutral" | "gradient" | "custom" | 'neutral' | Sets the color of the content area background (neutral or gradient). To use custom skin color, set it to custom and use the backgroundColor prop. |
width | string | '100%' | Sets the width of the component in % or px. |
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