Getting Started
Overview
Installation
Theme
Forms
Basic Inputs
Select
Custom Inputs
Components
Navigation
Components
68
Micro Charts
Libraries
Kanban Board
Image Designer
Video Player
Visual Builder
Content Editor
Data View
Purchase

Comparison Slider

Comparison Slider compares two visual layers with a draggable vertical divider. Use it for before-and-after images, photo edits, design changes, product variations, UI before-and-after states, image processing results, maps, reports, and other visual diffs.

Use it for:
  • Comparing a baseline image with an edited or changed image.
  • Showing two matching visual states in the same size and perspective.
  • Letting users drag the handle to reveal more of the before or after layer.
  • Setting the starting divider position with initialPosition.

Always give the slider a stable width and height or aspect ratio. The before and after layers should match in size and perspective. Do not use Comparison Slider as a gallery, carousel, image viewer, range input, data table comparison, or text comparison tool.

The NgStarter Angular Comparison Slider component lets you compare two aligned visual layers with a draggable before-and-after divider. Use for before-and-after images, photo edits, design changes, product variations, UI state diffs, image processing results, maps, reports, and other visual diffs. It includes examples for Basic Comparison Slider.

Basic Comparison Slider

Use Comparison Slider to compare two aligned visual states, such as before and after images. Give the component a stable size or aspect ratio so both layers line up correctly.