Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Search Result Preview

ProNew

How a page will look in search results on a computer or a phone, cut off where a results page would cut it, with meters that say whether the title and description are missing, short, good or too long.

Installation

pnpm dlx shadcn@latest add @viewport/serp-preview

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
title*string

The page's title tag.

—
description*string

The page's meta description.

—
url*string

The page's address. Shown as a breadcrumb, the way results show it.

—
siteNamestring

The site's name, shown above the address.

—
classNamestring—

Accessibility

  • Each meter gives the length and the verdict as text.
  • The verdict is a word as well as a color.
  • The device switch reports which is pressed.
  • Respects prefers-reduced-motion.