PreviewWidget

Components/Media/Preview/PreviewWidget

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

Overview

Copy

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.

Do

  • Use it to illustrate how content (website, design, etc.) appears on the web.

Don't

  • Don't use it to illustrate how content appears on a browser. Use <BrowserPreviewWidget/> instead.
  • Don't use it to illustrate how content appears on a mobile device. Use <MobilePreviewWidget/> instead.
  • Don't use it to preview what information will be displayed when users share a specific URL on a social media platform. Use <SocialPreview/> instead.

Feature examples

Structure

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.

Copy

Skin

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.

Copy

Content Outline

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.

Copy

Dimensions

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.

Copy

Scrollable Content

Support scroll for overflowed content with `scrollable` prop. Default value for `scrollable` is `false`.

Copy

Common use case examples

Design Previews

Preview widget lets the users preview their website designs / templates / other content on a separate mock window.

Copy

Settings Previews

The component illustrates how content looks like on the website while changing its settings in real-time.

Copy

Code

Copy

Props

NameTypeDefaultDescription
backgroundColorstring—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
dataHookstring—Applies a data-hook HTML attribute to be used in the tests.
heightstring'auto'Adjusts the height of the component or can be set in specific % or px.
scrollablebooleanfalseEnables 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.
widthstring'100%'Sets the width of the component in % or px.

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.330.0 (2026-09-28) — maintenance release, no component-specific changes
  • 1.328.0 (2026-09-22) — 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.320.0 (2026-09-03) — maintenance release, no component-specific changes
  • 1.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.295.0 (2026-07-03) — 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.289.0 (2026-06-17) — maintenance release, no component-specific changes
  • 1.266.0 (2026-04-07) — maintenance release, no component-specific changes
  • 1.263.0 (2026-03-31) — fix: fix gradient in token themes (#15913) — has visual 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.138.1 (2024-10-30) — maintenance release, no component-specific changes
  • 1.102.0 (2024-04-16) — 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?