Ravi Katiyar

Image Comparison Slider (Horizontal)

Galleries 825

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.8K
  • Hero

    Hero

    3.4K
  • Circular Gallery

    Circular Gallery

    2.9K
  • Minimalist Hero

    Minimalist Hero

    2.7K
  • Glass Calendar

    Glass Calendar

    2K
  • 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

    2
  • Animated Gallery

    Animated Gallery

    1.5K
  • Thumbnail image viewer

    Thumbnail image viewer

    99
  • Editorial Collage Hero

    Editorial Collage Hero

    501
  • Image Gallery

    Image Gallery

    95
  • Elastic Gallery

    Elastic Gallery

    1.1K
  • Folded Card

    Folded Card

    38
  • Hero Section 6

    Hero Section 6

    949