# Comparison Standard 1 - Drag before and after

> Image comparison slider in drag mode with a default handle.

A shadcn/ui block from the [@shadcnblocks](https://shadcnblocks.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcnblocks/comparison-comparison-standard-1).

- Page, with a live preview: https://shadcn.exchange/r/shadcnblocks/comparison-comparison-standard-1
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcnblocks/comparison-comparison-standard-1-light-557f3eb5d699cdba.png
- Registry item: https://shadcnblocks.com/r/comparison-comparison-standard-1.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://shadcnblocks.com/r/comparison-comparison-standard-1.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `https://www.kibo-ui.com/r/comparison.json`

## Files

### `example/comparison/comparison-standard-1.tsx`

```tsx
"use client";

import {
  Comparison,
  ComparisonHandle,
  ComparisonItem,
} from "@/components/kibo-ui/comparison";

export const title = "Drag before and after";

const Example = () => (
  <Comparison className="aspect-video w-[28rem] max-w-full overflow-hidden rounded-lg border">
    <ComparisonItem position="left">
      <img
        alt="Before"
        className="size-full object-cover"
        src="https://deifkwefumgah.cloudfront.net/shadcnblocks/block/placeholder-1.svg"
      />
    </ComparisonItem>
    <ComparisonItem position="right">
      <img
        alt="After"
        className="size-full object-cover"
        src="https://deifkwefumgah.cloudfront.net/shadcnblocks/block/placeholder-2.svg"
      />
    </ComparisonItem>
    <ComparisonHandle />
  </Comparison>
);

export default Example;
```
