GooglePreview

Components/Media/Preview

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

Overview

Copy

Google preview allows users to preview how the website appears in Google search results. It is frequently used in SEO settings' panels.

Do

  • Use it to illustrate how a website appears on Google search results.
  • Use it to visualize changes in SEO settings.

Don't

  • Don't use it to visualise how information is displayed when the URL address is shared on social media platforms (use <SocialPreview/> instead).

Feature examples

Structure

Component consists of 4 content areas:

  • siteName - shows the title of a page at the top of the widget.
  • previewUrl - shows the URL preview at the top of the widget.
  • title - shows the title of the page and its keywords, as set in the SEO settings.
  • description - shows a short description for the page, as set in the SEO settings (optional).
Copy

Skin

Change the background of the widget with skin prop:

  • light (default) sets the background to white with gray 1 px border.
  • transparent removes the background color and border.
Copy

Title

Limit the number of lines the title can take with titleMaxLines prop.

The default titleMaxLines value is 1.

Copy

Description

Use description to provide more context about a site.

Truncate the description after a certain number of lines with descriptionMaxLines prop.

The default descriptionMaxLines value is 2.

Copy

Common use case examples

SEO settings panel

Use Google preview to visualise SEO settings impact on user website appearance in Google search results.

Copy

Code

Copy

Props

NameTypeDefaultDescription
dataHookstring—Applies a data-hook HTML attribute to be used in the tests.
descriptionstring—Sets a short description for the page.
descriptionMaxLinesnumber2Truncates description text at a specific number of lines.
faviconstring—Specifies an URL link to favicon source. If not provided, a fallback favicon is displayed.
onDescriptionClickMouseEventHandler—Callback function triggered when description is clicked.
onDescriptionMouseEnterMouseEventHandler—Defines a callback function which is called when cursor enters the description.
onDescriptionMouseLeaveMouseEventHandler—Defines a callback function which is called when cursor leaves the description.
onTitleClickMouseEventHandler—Callback function triggered when title is clicked.
onTitleMouseEnterMouseEventHandler—Defines a callback function which is called when cursor enters the title.
onTitleMouseLeaveMouseEventHandler—Defines a callback function which is called when cursor leaves the title.
onWebsiteInfoClickMouseEventHandler—Callback function triggered when website info section (favicon, site name and preview URL) is clicked.
previewUrlstring—Sets the link for the site.
siteNamestring—Sets the site name of the website.
skin"light" | "transparent"—Sets widget background color.
titlestring—Sets the title of the page.
titleMaxLinesnumber1Truncates title text at a specific number of lines.
websiteInfoTooltipContentReactNode—When provided, a tooltip is displayed on website info section (favicon, site name and preview URL) hover.
websiteInfoTooltipPropsPartial<TooltipCommonProps>—Allows to pass tooltip common props to website info tooltip.

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
getPreviewUrlGet the current count
getTitleClick the button
getDescriptionGet the button's text
getSiteNameGet site name
titleMouseEnterTriggers title mouse enter
titleMouseLeaveTriggers title mouse leave
descriptionMouseEnterTriggers description mouse enter
descriptionMouseLeaveTriggers description mouse leave
clickWebsiteInfoClicks on the website info section
clickTitleClicks the title
clickDescriptionClicks the description
isWebsiteInfoTooltipEnabledReturns true if website info section has a tooltip
isWebsiteInfoTooltipExistsReturns true if website info section tooltip exists on the DOM
getWebsiteInfoTooltipContentReturns content of website info section tooltip
websiteInfoTooltipMouseEnterTriggers tooltip mouse enter
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.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.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.295.0 (2026-07-03) — feat: theme-aware tokens for Studio 2.0 (odeditor-dark) (#16473) — has visual 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.272.0 (2026-04-27) — 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.254.0 (2026-02-03) — maintenance release, no component-specific changes
  • 1.247.2 (2026-01-21) — maintenance release, no component-specific changes
  • 1.115.0 (2024-07-17) — maintenance release, no component-specific changes
  • 1.106.0 (2024-05-24) — maintenance release, no component-specific changes
  • 1.102.0 (2024-04-16) — maintenance release, no component-specific changes
  • 1.95.0 (2024-02-15) — fix: previewUrl parsing issue (#13322)
  • 1.93.1 (2024-02-12) — feat: add favicon, site name and events (#13224)
  • 1.92.1 (2024-02-05) — maintenance release, no component-specific changes

Last updated: 22 October 2026

Did this help?