> For the complete documentation index, see [llms.txt](https://help.brickspacelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.brickspacelab.com/slab/content/blocks/basics/image-comparison.md).

# Image comparison

<figure><img src="https://3723856256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGnixyIfIYFWroNtVmZo6%2Fuploads%2Fgit-blob-dd726b2f4dc03030cc40764067f78f3dafbc502a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## Overview

Image comparison section that shows before/after images with an interactive slider.

## Common use cases

* Display before and after product transformations
* Show product variations side by side
* Compare different design options
* Create interactive product demonstrations

## Block settings

### General

| Setting                | Description                 | Options                   |
| ---------------------- | --------------------------- | ------------------------- |
| Show advanced settings | Reveals visibility settings | Checkbox (default: false) |

### Content

| Setting      | Description                                              | Options                               |
| ------------ | -------------------------------------------------------- | ------------------------------------- |
| Drag label   | Text displayed when the slider is at the center position | Text input (default: Drag to explore) |
| Image before | The "before" image to display                            | Image picker                          |
| Before label | Label text for the before image                          | Text input (default: Before)          |
| Image after  | The "after" image to display                             | Image picker                          |
| After label  | Label text for the after image                           | Text input (default: After)           |

### Spacing

| Setting                   | Description                                   | Options                   |
| ------------------------- | --------------------------------------------- | ------------------------- |
| Enable horizontal padding | Adds horizontal padding around the comparison | Checkbox (default: false) |
| Enable top padding        | Adds top padding around the comparison        | Checkbox (default: false) |
| Enable bottom padding     | Adds bottom padding around the comparison     | Checkbox (default: false) |

### Color

| Setting      | Description                                        | Options                                                                                                                                                         |
| ------------ | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Color scheme | Controls the background and text color combination | <p>• Body<br>• Neutral<br>• Accent 1 (default)<br>• Accent 2<br>• Accent 3<br>• Shade 1<br>• Shade 2<br>• Shade 3<br>• Primary<br>• Secondary<br>• Tertiary</p> |
| Border color | Controls the border color                          | <p>• Body<br>• Subtle<br>• Strong<br>• Primary<br>• Secondary<br>• Tertiary<br>• None</p>                                                                       |

### Style

| Setting           | Description                                                    | Options                                                |
| ----------------- | -------------------------------------------------------------- | ------------------------------------------------------ |
| Aspect ratio      | Controls the aspect ratio of the comparison container          | <p>• Square<br>• Landscape (default)<br>• Portrait</p> |
| Show entire image | Uses object-contain instead of object-cover to show full image | Checkbox (default: false)                              |

### Display

| Setting    | Description                        | Options                                                                                                                            |
| ---------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Visibility | Controls when the block is visible | <p>• All (default)<br>• Mobile only<br>• Desktop only</p><p><br><br>Visible when <strong>Show advanced settings</strong> is on</p> |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.brickspacelab.com/slab/content/blocks/basics/image-comparison.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
