SocialPostPreview

Components/Media/Preview/SocialPostPreview

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

Overview

Copy

Social Post Preview allows users to preview a post they are about to publish on Facebook or Instagram.

Do

  • Use it when site owners need to preview how their social media post will be displayed specifically on Facebook or Instagram.
  • Use it to visualize real-time changes in post content.

Don't

  • Don't use it to illustrate how content appears on social media platforms other than Instagram or Facebook. Use <SocialPreview/> instead.
  • 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 display how a webpage appears on Google search results (use <GooglePreview/> instead).

Feature examples

Structure

Social post preview consists of these content areas:
 - Profile image that represents the user's social media account. Add image URL with `profileImageSrc` prop.
 - `profileName` - username in Facebook or Instagram.
 - `caption` - textual content of the post, including plain text, hashtags and links.
 - `media` - visual content of the post.

Note that `profileName`, `caption`, and `media` containers are nodes, i.e., they accept any components as their children.

Copy

Skin

Control the appearance and purpose of the component using `skin` prop.
 - `facebook` (default) - visualizes content as posted on Facebook.
 - `instagram` - visualizes content as posted on Instagram.

Copy

Caption

Add a message to the post with caption prop.

Use standard <a> and <br> tags to format post hashtags and links (see <Text/> story for more guidance).

Note that a link can only be added for posts on Facebook (skin='facebook').

Copy

Media

Include visual content for a post by adding an <Image/> component to the `media` container.

Copy

Common use case examples

Preview before Publishing a Social Post

Add the component next to the form where users edit their Facebook or Instagram post content.

Copy

Code

Copy

Props

NameTypeDefaultDescription
captionReactNode—Adds textual post content.
dataHookstring—Applies a data-hook HTML attribute to be used in the tests.
mediaReactNode—Adds visual post content (most commonly, is added as a child item)
profileImageSrcstring—Contains a URL link to the post's profile picture.
profileNameReactNode—Contains the post's profile name (a username in Facebook or Instagram)
skin"facebook" | "instagram"—Controls the appearance and layout of the component.

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
getSkinReturns skin value
getCaptionReturns caption value
getProfileNameReturns profile name value
getProfileImageSrcReturns profile image source value
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.340.0 (2026-10-21) — maintenance release, no component-specific changes
  • 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.295.0 (2026-07-03) — maintenance release, no component-specific changes
  • 1.292.0 (2026-06-22) — 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.212.0 (2025-08-11) — 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: 22 October 2026

Did this help?