Ravi Katiyar

Image Comparison Slider (Horizontal)

Galleries 842

About

Horizontal Image Comparison Slider – Interactive before/after viewer. Allows users to compare two images with a draggable horizontal handle. Perfect for showcasing edits, retouching, or visual transformations in photography, design, or beauty apps.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Image Comparison Slider (Horizontal) to your project and fits it to your theme.

Code

How Image Comparison Slider (Horizontal) is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

// image-comparison-slider/demos/default/code.demo.tsx

import { ImageComparisonSlider } from "@/components/ui/image-comparison-slider-horizontal"; // Adjust the import path

export default function ImageComparisonSliderDemo() {
  return (
    <div className="w-full max-w-4xl mx-auto">
      <div className="rounded-lg border overflow-hidden aspect-[16/9]">
        <ImageComparisonSlider
          leftImage="https://cdn.21st.dev/assets/mirror/05/0556b3e0953faa718b15934a7aa515d98f2d94d2d497648f01a782b09625ce63.jpg"
          rightImage="https://cdn.21st.dev/assets/mirror/05/0556b3e0953faa718b15934a7aa515d98f2d94d2d497648f01a782b09625ce63.jpg"
          altLeft="A colorful mountain landscape at night"
          altRight="The same mountain landscape in black and white"
        />
      </div>
    </div>
  );
}

Dependencies

More by Ravi Katiyar

View all
  • Animated Shader Hero

    Animated Shader Hero

    3.9K
  • Hero

    Hero

    3.5K
  • Circular Gallery

    Circular Gallery

    3K
  • Minimalist Hero

    Minimalist Hero

    2.8K
  • Glass Calendar

    Glass Calendar

    2.1K
  • Floating Icons Hero Section

    Floating Icons Hero Section

    2K
  • Feature Carousel

    Feature Carousel

    1.8K
  • AI Image Generator Hero

    AI Image Generator Hero

    1.5K

More in Galleries

View all
  • Scattered About

    Scattered About

    83
  • Product Hover Showcase

    Product Hover Showcase

    125
  • Photo Deck

    Photo Deck

    82
  • Gallery Component

    Gallery Component

    50
  • Morph Gallery

    Morph Gallery

    6
  • File Upload

    File Upload

    22
  • About 3

    About 3

    460
  • Cylinder Tunnel Gallery

    Cylinder Tunnel Gallery

    63