{%- comment -%} MIT License · (c) 2026 Lintel · https://lintelagency.com/resources/shopify-sections {%- endcomment -%} {%- comment -%} Before / after slider: two images in one frame, a draggable divider reveals the "before" image over the "after" image. A native range input drives the divider, so keyboard and screen readers work; pointer drag works anywhere on the frame. Horizontal or vertical split. Without JavaScript only the "after" image shows, in full. The divider moves along the physical x / y axis of the photo, so its CSS uses left / top on purpose. Depends on: snippets/lib-image.liquid, snippets/lib-button.liquid {%- endcomment -%} {%- comment -%} "Adapt" takes its shape from the after image; both images always share that frame. {%- endcomment -%} {%- liquid assign s = section.settings assign heading_tag = s.heading_tag | default: 'h2' assign eager = false if section.index <= 2 assign eager = true endif assign label_before = s.label_before | default: 'Before' assign label_after = s.label_after | default: 'After' assign ratio_d = '3 / 2' assign after_d = s.image_after if after_d == blank assign after_d = s.image_after_mobile endif if after_d != blank and after_d.width and after_d.height assign ratio_d = after_d.width | append: ' / ' | append: after_d.height endif assign ratio_m = ratio_d if s.image_after_mobile != blank and s.image_after_mobile.width and s.image_after_mobile.height assign ratio_m = s.image_after_mobile.width | append: ' / ' | append: s.image_after_mobile.height endif assign sizes = '(min-width: 1200px) 1200px, 100vw' if s.layout == 'beside' assign sizes = '(min-width: 990px) 60vw, 100vw' endif assign has_copy = false if s.heading != blank or s.text != blank or s.button_label != blank assign has_copy = true endif -%}
Drag the divider to see one bag before and after a single treatment with our cleaner and beeswax conditioner. Same light, same bench, nothing retouched but the leather.
" }, { "type": "header", "content": "Images" }, { "type": "paragraph", "content": "Use two photos taken from the same spot. Both are shown in the same frame, so they always share one shape." }, { "type": "image_picker", "id": "image_before", "label": "Before image (desktop)" }, { "type": "image_picker", "id": "image_before_mobile", "label": "Before image (mobile)", "info": "Optional. Shown below 750px." }, { "type": "image_picker", "id": "image_after", "label": "After image (desktop)", "info": "Shown on its own when JavaScript is off." }, { "type": "image_picker", "id": "image_after_mobile", "label": "After image (mobile)", "info": "Optional. Shown below 750px. Set both mobile images or neither." }, { "type": "select", "id": "image_ratio", "label": "Image shape on desktop", "info": "Adapt uses the shape of the after image.", "options": [ { "value": "adapt", "label": "Adapt to image" }, { "value": "square", "label": "Square" }, { "value": "portrait", "label": "Portrait" }, { "value": "landscape", "label": "Landscape" }, { "value": "wide", "label": "Wide" } ], "default": "landscape" }, { "type": "select", "id": "image_ratio_mobile", "label": "Image shape on mobile", "options": [ { "value": "adapt", "label": "Adapt to image" }, { "value": "square", "label": "Square" }, { "value": "portrait", "label": "Portrait" }, { "value": "landscape", "label": "Landscape" }, { "value": "wide", "label": "Wide" } ], "default": "portrait" }, { "type": "range", "id": "image_radius", "label": "Image corner radius", "min": 0, "max": 40, "step": 2, "unit": "px", "default": 16 }, { "type": "header", "content": "Slider" }, { "type": "select", "id": "orientation", "label": "Divider direction", "options": [ { "value": "horizontal", "label": "Left to right" }, { "value": "vertical", "label": "Top to bottom" } ], "default": "horizontal" }, { "type": "range", "id": "start_position", "label": "Start position", "info": "How much of the before image shows at first.", "min": 0, "max": 100, "step": 5, "unit": "%", "default": 50 }, { "type": "select", "id": "knob_style", "label": "Handle style", "options": [ { "value": "circle", "label": "Circle with arrows" }, { "value": "arrows", "label": "Arrows only" }, { "value": "line", "label": "Line only" } ], "default": "circle" }, { "type": "checkbox", "id": "show_labels", "label": "Show labels on the images", "default": true }, { "type": "text", "id": "label_before", "label": "Before label", "default": "Before" }, { "type": "text", "id": "label_after", "label": "After label", "default": "After" }, { "type": "select", "id": "label_position", "label": "Label position", "visible_if": "{{ section.settings.show_labels and section.settings.orientation == 'horizontal' }}", "options": [ { "value": "top", "label": "Top" }, { "value": "bottom", "label": "Bottom" } ], "default": "top" }, { "type": "header", "content": "Button" }, { "type": "text", "id": "button_label", "label": "Button label", "default": "Shop the care kit" }, { "type": "url", "id": "button_url", "label": "Button link" }, { "type": "select", "id": "button_style", "label": "Button style", "options": [ { "value": "primary", "label": "Solid" }, { "value": "outline", "label": "Outline" }, { "value": "text", "label": "Text link" } ], "default": "primary" }, { "type": "header", "content": "Layout" }, { "type": "select", "id": "layout", "label": "Layout", "options": [ { "value": "stacked", "label": "Text above, image full width" }, { "value": "beside", "label": "Image beside text" } ], "default": "beside" }, { "type": "select", "id": "image_position", "label": "Image position on desktop", "visible_if": "{{ section.settings.layout == 'beside' }}", "options": [ { "value": "right", "label": "Right" }, { "value": "left", "label": "Left" } ], "default": "right" }, { "type": "select", "id": "mobile_order", "label": "Order on mobile", "options": [ { "value": "text_first", "label": "Text first" }, { "value": "image_first", "label": "Image first" } ], "default": "text_first" }, { "type": "select", "id": "section_width", "label": "Width", "options": [ { "value": "page", "label": "Page width" }, { "value": "full", "label": "Full width" } ], "default": "page" }, { "type": "text_alignment", "id": "text_alignment", "label": "Text alignment on desktop", "default": "left" }, { "type": "select", "id": "text_alignment_mobile", "label": "Text alignment on mobile", "options": [ { "value": "left", "label": "Left" }, { "value": "center", "label": "Center" }, { "value": "right", "label": "Right" } ], "default": "left" }, { "type": "header", "content": "Colors" }, { "type": "color", "id": "color_bg", "label": "Background", "default": "#F6F1EA" }, { "type": "color_background", "id": "color_bg_gradient", "label": "Background gradient", "info": "Optional. Covers the background color." }, { "type": "color", "id": "color_text", "label": "Text", "default": "#2B211A" }, { "type": "color", "id": "color_accent", "label": "Accent (button, focus ring)", "default": "#8A4B22" }, { "type": "color", "id": "color_accent_text", "label": "Text on accent", "default": "#FFFFFF" }, { "type": "color", "id": "color_knob", "label": "Divider, handle and label background", "default": "#FFFFFF" }, { "type": "color", "id": "color_knob_icon", "label": "Handle arrows and label text", "default": "#2B211A" }, { "type": "header", "content": "Spacing and visibility" }, { "type": "range", "id": "padding_top", "label": "Top padding on desktop", "min": 0, "max": 200, "step": 4, "unit": "px", "default": 88 }, { "type": "range", "id": "padding_bottom", "label": "Bottom padding on desktop", "min": 0, "max": 200, "step": 4, "unit": "px", "default": 88 }, { "type": "range", "id": "padding_top_mobile", "label": "Top padding on mobile", "min": 0, "max": 160, "step": 4, "unit": "px", "default": 48 }, { "type": "range", "id": "padding_bottom_mobile", "label": "Bottom padding on mobile", "min": 0, "max": 160, "step": 4, "unit": "px", "default": 56 }, { "type": "select", "id": "show_on", "label": "Show on", "options": [ { "value": "all", "label": "All devices" }, { "value": "desktop", "label": "Desktop only" }, { "value": "mobile", "label": "Mobile only" } ], "default": "all" }, { "type": "text", "id": "anchor_id", "label": "Anchor ID", "info": "Optional. Link to this section with #your-id." } ], "presets": [ { "name": "Lib · Before / after" } ] } {% endschema %}