--- 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 Grayscale version of kittens in a basket looking around. Color version of kittens in a basket looking around. ``` ```jsx:react import SlImageComparer from '@shoelace-style/shoelace/dist/react/image-comparer'; const App = () => ( Grayscale version of kittens in a basket looking around. Color version of kittens in a basket looking around. ); ``` ## 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 A person sitting on bricks wearing untied boots. A person sitting on a yellow curb tying shoelaces on a boot. ``` ```jsx:react import SlImageComparer from '@shoelace-style/shoelace/dist/react/image-comparer'; const App = () => ( A person sitting on bricks wearing untied boots. A person sitting on a yellow curb tying shoelaces on a boot. ); ```