---
meta:
title: Image Comparer
description: Compare visual differences between similar photos with a sliding panel.
layout: component
---
For best results, use images that share the same dimensions. The slider can be controlled by dragging or pressing the left and right arrow keys. (Tip: press shift + arrows to move the slider in larger intervals, or home + end to jump to the beginning or end.)
```html:preview
```
```jsx:react
import SlImageComparer from '@shoelace-style/shoelace/dist/react/image-comparer';
const App = () => (
);
```
## Examples
### Initial Position
Use the `position` attribute to set the initial position of the slider. This is a percentage from `0` to `100`.
```html:preview
```
```jsx:react
import SlImageComparer from '@shoelace-style/shoelace/dist/react/image-comparer';
const App = () => (
);
```