Before and after
Two images with a slider to compare them. Shown side by side without JavaScript.

What it is for
Two images with a slider to compare them, for repairs, edits or results.
Where you can use it
On any page, template, saved section, header or footer.
In the editor, open the Add tab of the left panel and drag it into a column. Its type is basic.before-after, version 1.
Options
Content tab
| Option | Key | Allowed values | Default |
|---|---|---|---|
| Before image | before | An image from the Media library. | Empty |
| After image | after | An image from the Media library. | Empty |
| Before alt text | beforeAlt | Text, up to 300 characters. One value per language. | Empty |
| After alt text | afterAlt | Text, up to 300 characters. One value per language. | Empty |
| Before label | beforeLabel | Text, up to 60 characters. One value per language. | “Before” |
| After label | afterLabel | Text, up to 60 characters. One value per language. | “After” |
| Start position (%) | start | A number from 0 to 100. | 50 |
| Orientation | orientation | Horizontal (horizontal), Vertical (vertical). | Horizontal (horizontal) |
| Shape | ratio | Auto (auto), 1:1 (1:1), 4:3 (4:3), 3:2 (3:2), 16:9 (16:9). | Auto (auto) |
| Slider name (for screen readers) | handleLabel | Text, up to 100 characters. One value per language. | “Comparison slider” |
| Load first (the main image of the page) | priority | On or off. | Off |
Style tab
| Option | Key | Allowed values | Default |
|---|---|---|---|
| Handle colour | handleColor | A theme colour (token:name) or a hex colour (#rrggbb or #rrggbbaa). | Empty |
Every component also has the common options: Hide, Anchor, Space above, Space below, Entrance animation and Entrance delay.
Responsive behaviour
Every option can be set again for tablet (768 to 1024 px) and phone (767 px and below): switch the device at the top of the editor and change it there. Tablet starts from the desktop value and phone from the tablet value, so you only set what differs.
The space is reserved from the shape you choose (Auto uses the shape of the Before image), on every device.
SEO and accessibility
Both images are written on the server with their alt text and labels. Without JavaScript they show side by side. With JavaScript the handle is a range input you can move with the arrow keys, Home and End.
With an AI agent
An agent adds it with add_widget and changes its options with update_node, using the keys above. See the MCP tool reference.
{
"type": "basic.before-after",
"v": 1,
"props": {}
} @usethrottle/builder-schema 0.4.2 and @usethrottle/storefront-react 0.4.5.