Component packs › Snippet › Link Preview

Link Preview

Drag the focus point on the share image and the chat, post and work chat previews all re-crop around it.

Link Preview is a preview from Snippet, a component pack with 7 preview components: Seven preview components that show how a page or post will look before it goes out, measured, not guessed. Price: $2 for the whole pack.

Built with: focus-point crop, three contexts, per-place text cut.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Link Preview props

PropTypeDefaultDescription
darkboolean
autoplayboolean
domainstring
titlestring
descriptionstring
photostring
srcsRecord<string
onChange(v: { focus: [number, number] }) => void

Methods on the ref

Use it in React

import LinkPreview from './LinkPreview';

<LinkPreview />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Snippet

Good for: SEO and social preview components.