Before/After Card

A side-by-side image card for showing before and after results, with badges and a customizable footer.

Demo

Before
After
Sarah M.Lost 28 lbs

Installation

pnpm dlx shadcn@latest add @turbopills-ui/before-after-card

Usage

tsx
1import { BeforeAfterCard } from "@/components/turbopills/blocks/before-after-card"
tsx
1<BeforeAfterCard name="Sarah M." />

Props

PropTypeDefaultDescription
namestringRequired. Name displayed in the card footer.
beforeImagestring?URL for the "before" image. Falls back to a colored placeholder.
afterImagestring?URL for the "after" image. Falls back to a colored placeholder.
badgeContentReactNode?<Check /> Lost 28 lbsCustom content for the badge in the footer.
classNamestring?Additional CSS classes for the card wrapper.