# Ecommerce Product Feature: Before After Comparison

A slider that wipes between two product images so buyers see the difference at a glance. Ideal for skincare, editing tools, or cleaning results.

- Page: https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/before-after-comparison
- Collection: [Ecommerce](https://www.shadcn-ui-blocks.com/blocks/ecommerce), Free tier
- Group: [Product Features](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features)
- Created: 2026-06-14
- Preview image: https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/before-after-comparison.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/ecommerce-product-features-before-after-comparison
```

A free block: it installs with no account or key. Or install it by URL: `npx shadcn@latest add "https://www.shadcn-ui-blocks.com/r/ecommerce-product-features-before-after-comparison.json"`.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: badge, button
- Installs to: `@/components/blocks/ecommerce/product-features/before-after-comparison`

## About this block

Before After Comparison is a two-panel product showcase. A centered heading
and subtext sit above a five-column grid: a narrow left rail lists all
available features as selectable buttons, and the wider right area holds the
active comparison. The comparison itself is a draggable image wiper: the
"before" photo sits beneath the full frame, the "after" photo clips to
whatever width the drag handle sits at, and each side carries a floating
label. Below the wiper a detail card shows the active feature title, a short
description, a bulleted list of key improvements, and two call-to-action
buttons. Previous and Next buttons sit at the bottom to step through features
without touching the side rail.

Each feature entry is fully independent. You can rewrite the titles,
descriptions, improvement bullets, and button labels freely. The number of
feature entries is not fixed, so you can add or remove items from the list
and the navigation updates automatically. On smaller screens the side rail
collapses and the chevron buttons take over navigation.

## When to use

Reach for this block when you need to prove a measurable upgrade rather than
just list it. It suits a fintech or banking product page where you want to
show the difference between an old dashboard and a redesigned one, a legacy
report layout versus a modern analytics view, or a cluttered onboarding flow
versus a streamlined one. The drag interaction forces buyers to engage with
the difference rather than skim a bullet list, which makes the improvement
feel concrete. If you only have a single comparison, the
[Split Image Features](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/split-image-features)
block is a simpler fit. If you have many distinct feature areas to cover, the
side rail here handles them more cleanly than a carousel.

A natural flow around it on an Ecommerce page:

**Before**

- [Product Overview](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-overview) to introduce the
  product before drilling into the specifics of what changed
- [Alternating Features](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/alternating-features)
  for a high-level walkthrough before the wiper adds proof

**After**

- [Customer Reviews](https://www.shadcn-ui-blocks.com/blocks/ecommerce/ecommerce-customer-reviews) to back
  up the visible improvements with real buyer voices
- [Feature Comparison Table](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/feature-comparison-table)
  when shoppers need a side-by-side spec breakdown after seeing the visuals

## What you can customize

The block has three independently swappable layers:

- **Feature set.** Swap the images, labels, descriptions, and improvement
  bullets for each entry without touching the wiper logic or navigation.
- **Number of features.** Add or remove entries in the features array and
  the side rail and step controls reflect the new count automatically.
- **Call-to-action buttons.** The two buttons in the detail card accept any
  label and link, so you can point to a product page, a pricing comparison,
  or a live demo.

> Tip: keep the improvements list to three or four short items per feature
> so the detail card stays compact and buyers can scan it at a glance.

## More in Ecommerce Product Features

- [3D Feature Carousel](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/3d-feature-carousel)
- [Alternating Features](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/alternating-features)
- [Animated Features Grid](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/animated-features-grid)
- [Carousel Feature Showcase](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/carousel-feature-showcase)
- [Expandable Features Grid](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/expandable-features-grid)
- [Feature Accordion](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/feature-accordion)
- [Feature Comparison Table](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/feature-comparison-table)
- [Feature Tabs Navigation](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/feature-tabs-navigation)
- [Feature Timeline](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/feature-timeline)
- [Features Testimonial Combo](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/features-testimonial-combo)
- [Horizontal Scrolling Features](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/horizontal-scrolling-features)
- [Image Hotspot Features](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/image-hotspot-features)
- [Interactive Feature Tabs](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/interactive-feature-tabs)
- [Simple Feature Grid](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/simple-feature-grid)
- [Split Image Features](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/split-image-features)
- [Stats Feature Showcase](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/stats-feature-showcase)
- [Timeline Feature Showcase](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/timeline-feature-showcase)
- [Video Feature Showcase](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-features/video-feature-showcase)
