Component packs › Snippet › Post Preview

Post Preview

Switch the crop and the phone feed reshapes around the photo; the caption is cut at “more” where the feed would cut it.

Post 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: crop morph, measured caption cut, double-tap burst.

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.

Post Preview props

PropTypeDefaultDescription
darkboolean
autoplayboolean
namestring
handlestring
avatarstring
photosstring[]
captionstring
srcsRecord<stringYour own photo URLs keyed by the ids above.
onChange(v: { photo: string; crop: string; caption: string }) => void

Methods on the ref

Use it in React

import PostPreview from './PostPreview';

<PostPreview />

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

More in Snippet

Good for: SEO and social preview components.