---
description: >-
  Add the current section to demonstrate the seamless product transformations
  withing an interactive slider.
---

# Before/after image

This feature allows you to place two images side by side, enabling customers to compare the results instantly.

## Before/after image

Use the **"Heading"** field to title the section.

The title size can be changed in the **"Heading font size"** drop-down to "Small", "Medium", or "Large".

If you need to change a title color, use the **"Heading color"** picker. Here you can paste the hex code to the related field or choose the color using the paint pallet. The color settings will be used for both desktop and mobile.

Use the **"Description"** input field to add some descriptive text strings to the section that will appear under the heading.

The color of the description can be set in the **"Description color"** picker. The color you apply for the item will be used for a desktop and mobile.

### Button/Second button <a href="#button-second-button" id="button-second-button"></a>

Use the settings described below to add or edit buttons that will be displayed under the description.

Change the internal button text in the **"Label"** field. Leave the field blank to hide the button.

To redirect customers to the desired page, edit the **"Link"**. Use the link from the source selector, or paste the one if you use an external link.

Use the **"Style"** drop-down to change the button's appearance in the sections. The theme includes three styles that can work out in your store: "Primary", "Secondary", or "Link style". Each button style can be viewed on the following [help page](https://mpithemes.gitbook.io/unicorn-shopify-theme/dynamic-theme-sections#buttons).

Use the **"Color"** picker to change the button background color for the "Primary" style. For the "Secondary" style the colorized text and border inside the button will be added. If you used the "Link style", the color will be applied to the text link.

### Layout <a href="#layout" id="layout"></a>

Use the **"Layout"** drop-down to position the section's title, description, and buttons to the left or center. Select either "Heading on top" or "Heading top center."

### Content

In the **"Type"** picker specify the position of images:

* **"Horizontal"**. Set the horizontal dividing line by choosing this option, displaying the images side by side.

{% tabs %}
{% tab title="Desktop" %}
<figure><img src="https://2943342198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FysL5Hr1ZCl3x5RHWgJ3m%2Fuploads%2F3siXdCNXLpdgctJKGCII%2Fslider_horizontal.png?alt=media&#x26;token=9391dcd0-18a0-4242-bcde-3d3c64fd483d" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Mobile" %}
<figure><img src="https://2943342198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FysL5Hr1ZCl3x5RHWgJ3m%2Fuploads%2FRxtxZ4jddtrVMqpLqz85%2Fbefore%20after_mobile.png?alt=media&#x26;token=7ce31cda-d73d-496d-a5bb-8a385645c1c0" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

* **"Vertical"**. Use the provided option to display the vertical dividing line, separating images and positioning them at the top and bottom.

{% tabs %}
{% tab title="Desktop" %}
<figure><img src="https://2943342198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FysL5Hr1ZCl3x5RHWgJ3m%2Fuploads%2FdMezpjPFirKAYGZ8ehcT%2Fslider_vertical.png?alt=media&#x26;token=3dcf6683-729b-4e81-a50e-447a11e1fc81" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Mobile" %}
<figure><img src="https://2943342198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FysL5Hr1ZCl3x5RHWgJ3m%2Fuploads%2F5KUiX8EgERRWerpGz8eb%2Fbefore%20after_mobile%20vertical.png?alt=media&#x26;token=3f4e47cd-0a33-483c-bcff-3b4f81f63ca3" alt="" width="199"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

Adjust the default dividing line position in percentages using the **"Default state percent"** scale, which sets the visibility of each image in the section.

<figure><img src="https://2943342198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FysL5Hr1ZCl3x5RHWgJ3m%2Fuploads%2FKy85OWJluEaLfD2qDxgO%2Fbefore%20after_percent%20state.png?alt=media&#x26;token=034debdd-b4e4-44e9-a314-60c9d6a92e95" alt=""><figcaption></figcaption></figure>

Use the **"Height"** options to adapt a media to the desired size. There are a few available options that can be selected from the drop-down:

* **"Adapt to media"**. Displays an image in its original aspect ratio.
* **"Fullscreen"**. Set this option to show a media in the full width of a page. The image width will match the page width set in global settings if the "Enable page width" option is ticked under _Theme settings ->_ [_Layout_](https://mpithemes.gitbook.io/unicorn-shopify-theme/theme-settings/layout).
* **"Fullscreen without header"**. Using this option, media will be cropped at the top and bottom. The top spacing will be subtracted from the total height. Be sure to review the settings on the storefront to confirm they meet your expectations.
* **"Proportion in %"**. Select the option to adjust a media height as a percentage using the **"Proportion of height"** scale. The parameters can be changed from 10% to 210%.

\*The "Proportion in %" option is applied to mobile by default. To modify the height specifically for mobile, use the options in the "[<mark style="color:blue;">Mobile settings</mark>](#mobile-settings)" sub-section.

**"Proportion in %"** indicators:

\*100% = Square image

\*Less than 100% = Landscape

\*More than 100% = Portrait

\*For an ideal video aspect ratio (16:9), set the proportion to 56%.

* **"Fixed in px"**. This option helps to change image size in pixels by setting the parameters on the **"Fixed height"** scale. The height can be adjusted between 100 and 1000 pixels.

Use the **"Width"** drop-down to apply one of the options: "Standard" (boxed), "Wide" (full width of a screen), or "Fixed". Once the last option is selected, you can manually change the width from 450 to 2000 pixels using a **"Fixed width"** setting. The margins will be set to the left and right when using "Fixed".

\*The width of the media in the section cannot exceed the page width set in the global settings. Check the parameters in _Theme settings ->_ [_Layout_](https://mpithemes.gitbook.io/unicorn-shopify-theme/theme-settings/layout).

To read more about the described options, view the following [help page](https://mpithemes.gitbook.io/unicorn-shopify-theme/dynamic-theme-sections#content).

To add a divider between sections, use the **"Dividing line"** to set the position: "Top", "Bottom", or "Both". The dividing line will be hidden once you use the option "None".

On the **"Top spacing"** and **"Bottom spacing"** scales, decide whether to add spaces at the top and bottom of the section. Control spacing settings from 0 to 100 pixels on each scale.

### Animations <a href="#animation" id="animation"></a>

{% hint style="warning" %}
**Note!** The **"Image behavior"** and **"Desktop hover animation"** provide settings for adding image animation. Decide on an image animation effect from one of the drop-downs as these settings may not work together. Use the "None" option for the unnecessary feature.
{% endhint %}

To add a dynamic image motion to a static image, select the option under the **"Image behavior"** drop-down:

* **"None"**. Disables smooth image motion.
* **"Ambient movement"**. The option adds a slight circular movement of an image.
* **"Zoom in out"**. Creates a smooth zoom-in and then, zoom-out effect on the image.
* **"Zoom out in"**. Applies a zoom-out effect followed by image enlargement.
* **"Zoom random"**. This option will randomly zoom in or out of images.

**Desktop hover animation**

If you want to add an animation inside the image container, choose the suggested option from the list. By default, the block uses the **"Inherit global settings"** option. If there is no need to apply animation settings for the block individually, leave this option as it is. In this case, decide on the animation image effect in the global settings of the Theme Editor by using the "**Banner image desktop hover animation**" drop-down. Read the details on the following [help page](https://mpithemes.gitbook.io/unicorn-shopify-theme/theme-settings/styles).

The options **"Zoom in"** and **"Zoom out"** place the zooming effect to enlarge or decrease an image on the mouse hover. You can activate the opacity over the image by choosing **"Add overlay opacity"** and selecting a color for the _"Image overlay background"_ or _"Image overlay gradient"_ in the "[<mark style="color:blue;">Image</mark>](#image)" block. To use this option, make sure that the _"Image overlay opacity"_ is set up to be transparent. The overlay opacity and zooming effect on an image can be achieved with an active **"Zoom in, add overlay opacity"** or **"Zoom out, add overlay opacity"**. The option **"None"** deactivates the animation.

You can read more about the described options on the following [help page](https://mpithemes.gitbook.io/unicorn-shopify-theme/dynamic-theme-sections#animation).

### Mobile settings <a href="#mobile-settings" id="mobile-settings"></a>

Using the **"Enable mobile settings"** option, you can apply changes to the mobile mode regardless of the desktop settings.

The **"Height"** of an image on mobile can be changed by operating one of the options:

* **"Adapt to image"**. Displays the image in its original aspect ratio.
* **"Proportion in %"**. Select the option to adjust the image height as a percentage using the **"Proportion of height"** scale. The parameters can be changed from 10% to 210%.

**"Proportion in %"** indicators:

\*100% = Square image

\*Less than 100% = Landscape

\*More than 100% = Portrait

\*For an ideal video aspect ratio (16:9), set the proportion to 56%.

* **"Fixed in px"**. This option helps to change image size in pixels by setting the parameters on the **"Fixed height"** scale. The height can be adjusted between 100 and 700 pixels.

***

## Image

{% hint style="success" %}
**Tip:** Add each banner individually using the **"Image"** block. The provided block can be used twice.
{% endhint %}

### Image

In the **"Image"** selector, press "Select" to upload the necessary animation for both desktop and mobile. The recommended image ratio is two-to-one (width-to-height respectively). Once an image is selected, it can be linked to pages/ collections/ products. Choose the destination in the **"Link"** source selector.

If you need to change the **"Image overlay background"**, select the color from the color picker. By default, the color is set to transparent.

Press **"Image overlay gradient"** to apply the gradient vector. Read details on how to use the option [here](https://mpithemes.gitbook.io/unicorn-shopify-theme/dynamic-theme-sections#image).

Adjust the transparency of an image gradient overlay using the **"Image overlay opacity"** scale from 0 to 100%.

You can read more about the described options on the following [help page](https://mpithemes.gitbook.io/unicorn-shopify-theme/dynamic-theme-sections#image).

### Text

The option **"Desktop text position"** helps to place texts in different positions: "Top left", "Top", "Top right"; "Center left", "Center", "Center right"; or "Bottom left", "Bottom", "Bottom right". Select the "Auto" to leave the default layout settings. Choose an option that best fits your needs in the drop-down.

If you need to align the text to "Left", "Center", or "Right", select one of the options in the **"Desktop text alignment"** picker.

In the **"Text box desktop background"**, you can set the color from the color picker. By default, the color is set to transparent.

Use the **"Text box desktop opacity"** scale to change the text box background opacity from 0 to 100 %, where 0% is an invisible background, and 100% is opaque.

The **"Text box desktop width"** scale allows setting the text width from 30% to 100%.

Use the **"Heading"** field to insert a title. The **"Heading size"** can be changed to display in "Extra large", "Large", "Medium", "Small", or "Extra small".

If you need to change a title color, use the **"Heading color"** picker. The same color as for the desktop can be applied to the mobile view by enabling the "**Apply color on mobile"** option.

Use the **"Description"** input field to add some descriptive text strings to the banner that will appear under the heading.

Additionally, you can insert a text paragraph in the **"Description"** placeholder and connect a page in the **"Custom HTML"**. Or just connect a page with the block using the "Custom HTML" selector. Press "Select page" to choose the created page from the list or add a new one by pressing the button **"Create page"**. If you press the **"Create page"** button, you will be redirected to your _Shopify admin -> Online Store -> Pages_. Read details on how to create pages in the following [article](https://mpithemes.gitbook.io/unicorn-shopify-theme/faq/how-to-create-webpages).

If you need to change the description color, use the **"Text"** picker. The same color as for the desktop can be applied to the mobile view by enabling the "**Apply color on mobile"** option.

### Button/Second button <a href="#button-second-button" id="button-second-button"></a>

Change the internal button text in the **"Label"** field. Leave the field blank to hide the button.

To redirect customers to the desired page, edit the **"Link"**. Use the link from the source selector, or paste the one if you use an external link.

Use the **"Style"** drop-down to change the button's appearance in the sections. The theme includes three styles that can work out in your store: "Primary", "Secondary", or "Link style". Each button style can be viewed on the following [help page](https://mpithemes.gitbook.io/unicorn-shopify-theme/dynamic-theme-sections#buttons).

Use the **"Color"** picker to change the button background color for the "Primary" style. For the "Secondary" style the colorized text and border inside the button will be added. If you used the "Link style", the color will be applied to the text link.

### Mobile settings <a href="#mobile-settings-1" id="mobile-settings-1"></a>

The settings described below can be applied for mobile mode regardless of the desktop settings by activating the **"Enable mobile settings"** option.

**Image (Optional)**

Here you can select an image for mobile individually. Otherwise, the same image as for the desktop will be shown on mobile view. Press on **"Select"** to upload the one you need. The recommended image ratio is two-to-one (width-to-height respectively).

Check the **"Show image overlay"** option to display the color overlay of the image. This option works with the configured settings of the image overlay in the block. Find more details [<mark style="color:blue;">here</mark>](#image).

The heading size on mobile can be set in the corresponding drop-down by selecting one of the options: "Extra large", "Large", "Medium", "Small", or "Extra small". The "Same as on desktop" option saves the changes applied to the desktop.

The text position can be adjusted using the options in the **"Text position"** drop-down: "Top left", "Top", "Top right"; "Center left", "Center", "Center right"; or "Bottom left", "Bottom", "Bottom right". The "Same as on desktop" option saves the changes applied to the desktop.

If you need to align the text to "Left", "Center", or "Right", select one of the options in the **"Text alignment"** drop-down. To clarify the use of parameters, check the following [help page](https://mpithemes.gitbook.io/unicorn-shopify-theme/dynamic-theme-sections#mobile-settings).



Here is the example of the "Image" block:

<figure><img src="https://2943342198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FysL5Hr1ZCl3x5RHWgJ3m%2Fuploads%2FEocsIvhdJ3OrLTP9L9Sa%2Fbefore%20after_block.png?alt=media&#x26;token=00fde276-1e98-4a4c-98f9-1b5b1f236d4a" alt=""><figcaption></figcaption></figure>
