SocialPreview

Components/Media/Preview/SocialPreview

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

Overview

Copy

Social Preview allows users to see what information will be displayed once the URL address is shared on social media platforms.

Do

  • Use it when the site owner needs to preview how page information will be displayed on social media.

Don't

  • Don't use it as any other kind of preview for user-generated content.
  • Don't use it instead of the GooglePreview component.
  • Don't use it as an image preview.

Feature examples

Structure

Component consists of four areas: media, URL address, title, and description.

Copy

Size

Choose the size of the preview from:  - `large` - use for a preview generated by common social media platforms.
 - `small` - use as alternative size for the Twitter platform only.

Copy

Skin

Render preview for different social media platforms:
 - `social` - use for a preview generated by common social media platforms.
 - `twitter` - use to display a specific preview for twitter social media platform only

Copy

Common use case examples

Blog Post Share

In combination with Inputs, Social Preview allows site owners to tailor their blog posts' appearance on social media.

Copy

Code

Copy

Props

NameTypeDefaultDescription
dataHookstring—Applies a data-hook HTML attribute that can be used in the tests.
descriptionstring—A social post link description.
mediaReactNode—A slot to render a media item, most commonly the ImageViewer component.
previewUrlstring—A url representation of the social post link.
size"small" | "large"'large'Specifies the size of the preview. Size small works only in combination with twitter skin.
skin"twitter" | "social"'social'Changes the style of the preview.
titlestring—A social post link title.

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
getTitleGet SocialPreview title
getPreviewUrlGet SocialPreview url
getDescriptionGet SocialPreview description
getSkinGet SocialPreview skin
getSizeGet SocialPreview size
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.330.3 (2026-09-29) — 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.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.292.0 (2026-06-22) — maintenance release, no component-specific changes
  • 1.288.0 (2026-06-15) — 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.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?