> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: GooglePreview Component

## Article: GooglePreview Component

## Article Link: https://dev.wix.com/docs/wix-design-system/components/media/browser-preview-widget/google-preview-component.md

## Article Content:

# GooglePreview

_Components/Media/Preview_

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

## Overview

```jsx
<GooglePreview
  siteName="Wix Logo Maker"
  title="Logo Maker | Create Your Own Free Logo Design | Wix.com"
  previewUrl="https:/www.wix.com"
  description="With Wix Logo Maker, you can design a logo that looks exactly the way you want. Each logo is completely customizable—change the font, color, size."
  skin="light"
></GooglePreview>;
```

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).

```jsx
<GooglePreview
  siteName="Site name"
  title="Title"
  previewUrl="Preview URL"
  description="Description"
/>;
```

#### 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.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <GooglePreview
    siteName="Site Name"
    title="Title | <GooglePreview/> in light (default) background"
    previewUrl="www.site-name.com"
    description="A short description for a site"
    skin="light"
  />
  <GooglePreview
    siteName="Site Name"
    title="Title | <GooglePreview/> in transparent background"
    previewUrl="www.site-name.com"
    description="A short description for a site"
    skin="transparent"
  />
</StorybookComponents.Stack>;
```

#### Title

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

The default `titleMaxLines` value is 1.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <GooglePreview
    siteName="Site Name"
    title="Site Name | This is a single line title"
    previewUrl="www.site-name.com"
    description="A short description for a site"
  />
  <GooglePreview
    siteName="Site Name"
    title="Site Name | This is an especially long website title that does not fit in one line and gets truncated"
    previewUrl="www.site-name.com"
    description="A short description for a site"
  />
  <GooglePreview
    siteName="Site Name"
    title="Site Name | This is an especially long website title that does not fit in one line. However, titleMaxlines prop is set to 2, so the title wraps into two lines"
    previewUrl="www.site-name.com"
    description="A short description for a site"
    titleMaxLines={2}
  />
</StorybookComponents.Stack>;
```

#### 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.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <GooglePreview
    siteName="Site Name"
    title="Site Name | a title of your site"
    previewUrl="www.site-name.com"
    description="A short description for a site containing all the relevant keywords that get your website great results in search engines."
  />
  <GooglePreview
    siteName="Site Name"
    title="Site Name | a title of your site"
    previewUrl="www.site-name.com"
    description="This is a long description for a site containing all the relevant keywords that get your website great results in search engines. If the description is longer than 2 lines, by default it gets truncated by ellipses at the end of the second line. This is an example how the end of this sentence will not be visible, since it will get truncated by ellipses."
  />
  <GooglePreview
    siteName="Site Name"
    title="Site Name | Preview without description"
    previewUrl="www.site-name.com"
  />
</StorybookComponents.Stack>;
```

### Common use case examples

#### SEO settings panel

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

```jsx
() => {
  const [title, setTitle] = React.useState(
    'Logo maker | Create Your Own Free Logo Design | Wix.com',
  );
  const [siteName, setSiteName] = React.useState('Wix Logo Maker');
  const [description, setDescription] = React.useState(
    'With Wix Logo Maker, you can design a logo that looks exactly the way you want. Each logo is completely customizable - change the font, color, size.',
  );
  const [urlSlug, setUrlSlug] = React.useState('/logo-maker');
  const [indexablePage, setIndexablePage] = React.useState(false);

  return (
    <Card>
      <Card.Header title="Get found on Google" />
      <Card.Divider />
      <Card.Content>
        <Layout>
          <Cell span={6}>
            <Layout>
              <Cell>
                <FormField label="Site name">
                  <Input
                    placeholder="/your-URL-slug"
                    value={siteName}
                    onChange={(e) => setSiteName(e.target.value)}
                  />
                </FormField>
              </Cell>
              <Cell>
                <FormField label="URL slug">
                  <Input
                    placeholder="/your-URL-slug"
                    value={urlSlug}
                    onChange={(e) => setUrlSlug(e.target.value)}
                  />
                </FormField>
              </Cell>
              <Cell>
                <FormField label="Page title tag">
                  <InputArea
                    placeholder="Add your title tag here..."
                    value={title}
                    onChange={(e) => setTitle(e.target.value)}
                  />
                </FormField>
              </Cell>
              <Cell>
                <FormField label="Page meta description">
                  <InputArea
                    autoGrow
                    maxLength={200}
                    placeholder="Write 2 to 3 sentences describing what your site has to offer..."
                    value={description}
                    onChange={(e) => setDescription(e.target.value)}
                  />
                </FormField>
              </Cell>
              <Cell>
                <Box>
                  <FormField
                    label="Let search engines index this page"
                    labelPlacement="right"
                    stretchContent={false}
                    infoContent="Get listed with Google Search so potential customers can find you in online results"
                  >
                    <ToggleSwitch
                      checked={indexablePage}
                      onChange={() => setIndexablePage(!indexablePage)}
                    />
                  </FormField>
                </Box>
              </Cell>
            </Layout>
          </Cell>
          <Cell span={6}>
            <FormField label="Preview on Google">
              <GooglePreview
                siteName={siteName}
                title={title}
                previewUrl={'www.wix.com' + urlSlug}
                description={description}
                descriptionMaxLines={1}
              />
            </FormField>
          </Cell>
        </Layout>
      </Card.Content>
    </Card>
  );
};
```

## Code

```jsx
import { GooglePreview } from '@wix/design-system';
```

### Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `dataHook` | `string` | — | Applies a data-hook HTML attribute to be used in the tests. |
| `description` | `string` | — | Sets a short description for the page. |
| `descriptionMaxLines` | `number` | `2` | Truncates description text at a specific number of lines. |
| `favicon` | `string` | — | Specifies an URL link to favicon source. If not provided, a fallback favicon is displayed. |
| `onDescriptionClick` | `MouseEventHandler` | — | Callback function triggered when description is clicked. |
| `onDescriptionMouseEnter` | `MouseEventHandler` | — | Defines a callback function which is called when cursor enters the description. |
| `onDescriptionMouseLeave` | `MouseEventHandler` | — | Defines a callback function which is called when cursor leaves the description. |
| `onTitleClick` | `MouseEventHandler` | — | Callback function triggered when title is clicked. |
| `onTitleMouseEnter` | `MouseEventHandler` | — | Defines a callback function which is called when cursor enters the title. |
| `onTitleMouseLeave` | `MouseEventHandler` | — | Defines a callback function which is called when cursor leaves the title. |
| `onWebsiteInfoClick` | `MouseEventHandler` | — | Callback function triggered when website info section (favicon, site name and preview URL) is clicked. |
| `previewUrl` | `string` | — | Sets the link for the site. |
| `siteName` | `string` | — | Sets the site name of the website. |
| `skin` | `"light" \| "transparent"` | — | Sets widget background color. |
| `title` | `string` | — | Sets the title of the page. |
| `titleMaxLines` | `number` | `1` | Truncates title text at a specific number of lines. |
| `websiteInfoTooltipContent` | `ReactNode` | — | When provided, a tooltip is displayed on website info section (favicon, site name and preview URL) hover. |
| `websiteInfoTooltipProps` | `Partial<TooltipCommonProps>` | — | Allows to pass tooltip common props to website info tooltip. |

## Testkit

Import the driver matching your test environment:

```jsx
// UniDriver
import { GooglePreviewUniDriver } from '@wix/design-system/dist/testkit/unidriver';

// Vanilla
import { GooglePreviewTestkit } from '@wix/design-system/dist/testkit';

// Puppeteer
import { GooglePreviewTestkit } from '@wix/design-system/dist/testkit/puppeteer';

// Testing Library
import { GooglePreviewTestkit } from '@wix/design-system/dist/testkit/testing-library';
```

### Driver methods

| Method | Description |
| --- | --- |
| `getPreviewUrl` | Get the current count |
| `getTitle` | Click the button |
| `getDescription` | Get the button's text |
| `getSiteName` | Get site name |
| `titleMouseEnter` | Triggers title mouse enter |
| `titleMouseLeave` | Triggers title mouse leave |
| `descriptionMouseEnter` | Triggers description mouse enter |
| `descriptionMouseLeave` | Triggers description mouse leave |
| `clickWebsiteInfo` | Clicks on the website info section |
| `clickTitle` | Clicks the title |
| `clickDescription` | Clicks the description |
| `isWebsiteInfoTooltipEnabled` | Returns true if website info section has a tooltip |
| `isWebsiteInfoTooltipExists` | Returns true if website info section tooltip exists on the DOM |
| `getWebsiteInfoTooltipContent` | Returns content of website info section tooltip |
| `websiteInfoTooltipMouseEnter` | Triggers tooltip mouse enter |
| `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. |

## 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](invalid-url)) — 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](invalid-url))
- **1.93.1** (2024-02-12) — feat: add favicon, site name and events ([#13224](invalid-url))
- **1.92.1** (2024-02-05) — maintenance release, no component-specific changes