Swipe Carousel Post
An Instagram-style multi-slide post card: drag or swipe the media and the track snaps on a spring, a segmented bar fills with slide progress, the dot pager shrinks toward the edges and a double-tap drops a heart.
Try it: Drag the media sideways (or arrow keys); double-click to like.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/swipe-carousel-post.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/swipe-carousel-post. You can also copy the source into components/ui/swipe-carousel-post.tsx (view on GitHub).
Usage
import { SwipeCarouselPost } from '@/components/ui/swipe-carousel-post'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
slides | SwipePostSlide[] | DEFAULT_SWIPE_POST_SLIDES | { id, title, body?, kicker?, src?, alt? } — generated typographic slides unless you pass src. |
author / meta / caption / time | string | — | Header and caption copy. |
likes / comments | number | 1284 / 86 | Counts shown under the media. |
accent | string | '#d6336c' | Accent for the generated slides, avatar ring and active dot. |
autoPlay / interval | boolean / number | true / 4200 | Advance automatically while the progress segment fills; pauses on hover, focus, drag and offscreen, with a pause button. |
index / defaultIndex / onIndexChange | number | 0 | Controlled / uncontrolled slide index. |
defaultLiked / onLikeChange | boolean / (liked) => void | false | Like state (double-click the media also likes). |
defaultSaved / onSaveChange | boolean / (saved) => void | false | Bookmark state. |
Dependencies
motionlucide-react
Related Cards components
- Folder Fan Showcase
Social post cards wait inside a frosted-glass folder, peeking over the rim of a blurred front pocket. Hover or focus and they rise and fan out on staggered springs; pick one and it lifts clear of…
- Editorial Spread Card
A magazine cover on real CSS 3D: hover and it lifts off its spine, click and it swings open on a hinge while the issue slides to centre, revealing a two-page spread with a pull quote, deck and…
- Origami Unfold Card
A trail ticket that unfolds like a paper map: press the cover and two creased panels swing down in sequence on real CSS-3D hinges, catching light as they flatten, while the route draws itself and…
- Video Lightbox Dialog
A cinematic thumbnail with a clear-glass play button that grows into a focused player on a shared-layout spring while the page blurs back. Bring your own video, or use the generated preview with…
- Lenticular Shift Card
A postcard printed on a ridged lenticular sheet: tilting interlaces the scenes in fine vertical blinds that sweep across the print while a specular band rides the ridges.
- Neon Halo Card
A card rimmed by a slow sweep of coloured light: a conic gradient travels a hairline edge while a soft bloom breathes behind it, and the pointer pulls a quiet spotlight across the surface.…