Shows how a URL will look in a search result (desktop and mobile, truncated by pixel width like the real thing) and as a shared card on Facebook, LinkedIn, X, WhatsApp and Slack, with length meters and image warnings. For SEO panels, product pages and shareable quote links.
The Hammam Ritual, Step by Step — A First-Timer's Guide
Nov 8, 2026 — What happens in a traditional hammam, what to bring, and how to book your first 75-minute ritual at Defne Spa in Kadıköy.
Installation
The whole kit as one package — get updates by bumping the version. Add the styles to globals.css: @import "@vamos-ui/react/styles.css";
Usage
import { LinkPreviewTabs, SearchPreview, SocialCardPreview, LengthMeter } from "@vamos-ui/react/media";
<LinkPreviewTabs data={{ url, title, description, siteName, image }} highlight={focusKeyword} />
<LengthMeter value={seoTitle} field="title" label="SEO title" />The one deliberate token exception: the previews imitate third-party UIs (white background, link blue, system fonts, each platform's own dark theme) through local --preview-* variables in styles/media.css. The frame, meters and warnings use kit tokens.
Preview content is real, readable text (role="figure" with a label); meters never rely on colour alone.
Examples
Search: desktop and mobile
Titles are cut at ≈600 px on desktop with the ellipsis at a word; the focus keyword is bolded.
Desktop
Same-Day Delivery in Istanbul for E-commerce Brands …
Order by 13:00, delivered by 21:00 anywhere on both sides of the city. Live tracking, cash on delivery and returns handled by the same …
Mobile
Same-Day Delivery in Istanbul for E-commerce Brands, Retailers and Marketplaces | …
Order by 13:00, delivered by 21:00 anywhere on both sides of the city. Live tracking, cash on delivery …
Missing fields and warnings
Greyed fallbacks, a noindex banner, and warnings for a missing, square or small image — said in words.
Hidden from search engines (noindex)
Untitled page
No description: search engines will pick text from the page.
- No social image. The link will show as a plain card.
- Image is 1:1. LinkedIn shows 1.91:1 and will crop it.
- Image is 800×800. LinkedIn recommends at least 1200×630.
Length meters (SEO panel)
Counts graphemes and rendered pixels: "52 of 60 characters, 498 of 600 px: good".
Spring Menu 2027: Twelve New Plates from Our Garden
Asparagus, wild garlic and the first broad beans: our chef walks you through the new spring menu, served from 1 March.
API
LinkPreviewData
| Prop | Type | Default |
|---|---|---|
url / titleRequired. An empty title shows the "Untitled page" fallback. | string | — |
descriptionMeta / OG description. | string | — |
siteName / faviconShown in the search header and Slack. | string | — |
imageOG image. Assets use variants.og when present and are checked for ratio and size. | MediaAsset | string | null | — |
publishedAtDate before the description (locale dateStyle: medium). | Date | "YYYY-MM-DD" | — |
breadcrumbsReplaces the URL path in the search breadcrumb. | string[] | — |
twitterCardX card type. | "summary" | "summary_large_image" | "summary_large_image" |
noindexShows "Hidden from search engines". | boolean | — |
SearchPreview
| Prop | Type | Default |
|---|---|---|
dataThe page. | LinkPreviewData | — |
deviceLayout and truncation widths. | "desktop" | "mobile" | "desktop" |
highlightKeyword to bold in the description (locale-aware). | string | — |
appearanceauto follows the surrounding theme. | "light" | "dark" | "auto" | "auto" |
sizesm for sidebars. | "sm" | "md" | "md" |
SocialCardPreview
| Prop | Type | Default |
|---|---|---|
platformWhich card. | "facebook" | "linkedin" | "x" | "whatsapp" | "slack" | — |
data / appearance / size— | as above | — |
hideWarningsHide the image warnings under the card. | boolean | false |
LengthMeter
| Prop | Type | Default |
|---|---|---|
valueText to measure (graphemes). | string | — |
fieldAlso measure the SERP pixel width and use its ideal range. | "title" | "description" | — |
max / minCharacter limits; below min is "too short". | number | SERP ideal, else 160 / 0 |
devicePixel limits. | "desktop" | "mobile" | "desktop" |
labelAccessible name (role="meter"). | string | — |
LinkPreviewTabs
| Prop | Type | Default |
|---|---|---|
platformsTabs to show; search has a desktop/mobile switch. | ("search" | SocialPlatform)[] | ["search", "facebook", "x", "whatsapp"] |
defaultValue / highlight / appearance / sizePassed through. | — | — |
measureSerp(text, field, device?, locale?)
| Prop | Type | Default |
|---|---|---|
→Pixel width and where a search engine cuts the text. Constants in SERP_LIMITS (versioned). | { px, maxPx, truncated, cutAt, display } | — |
Social cards: every platform
Each platform's own layout and theme. appearance="auto" follows the surrounding light/dark theme.
facebook
linkedin
X
whatsapp
slack