Free
Pro

Image compare

A before and after image. Drag the handle in the middle to move the divider.

Pro

Pro — licensed

Image compare — part of Ply Pro

Unlock it plus 108 pro blocks, widgets & layouts — $99 one-time. Lifetime updates, 14-day money-back guarantee.

Unlock Pro

Before and after

Cliff house at golden hourCliff house at blue hourBlue hourGolden hour

Installation

bash
npx ply-ui-cli add image-compare

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Ply MCP server.

bash
npx -y ply-ui-mcp

Ply provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)
// Install: npx ply-ui-cli add image-compare
// Paths are relative to aliases.components (default: src/app/components)
import { ImageCompareComponent } from './image-compare/image-compare.component';

@Component({
  selector: 'app-your-component',
  imports: [
    ImageCompareComponent
  ],
  template: `...`
})
export class YourComponent {}

API for image-compare — generated from JSDoc in the library source.

API reference for image-compare
APIMemberTypeDefaultDescription
ply-image-compareclassstring''Extra host classes merged via `cn()`.
ply-image-comparebeforeSrcstring''Image shown on the leading side of the divider.
ply-image-compareafterSrcstring''Image shown behind the divider.
ply-image-comparebeforeAltunknown'Before'Alt text for the leading image.
ply-image-compareafterAltunknown'After'Alt text for the trailing image.
ply-image-comparebeforeLabelunknown'Before'Caption for the leading side.
ply-image-compareafterLabelunknown'After'Caption for the trailing side.
ply-image-comparearia-labelunknown'Comparison'Accessible name of the divider handle.
ply-image-comparepositionnumber50Divider position from 0 to 100. Two-way bindable.