Shoppable UGC Grid

Section

Customer photos with pulsing hotspot dots that reveal product popovers on click (uses <details>).

ProductConversionUgcAnimation
Edit
Copied 0 times
Preview
Accent
Section code
<section class="sl-shop-ugc" style="padding:clamp(32px,6vw,64px) 1rem;color:inherit;font-family:inherit;">
  <div style="max-width:1200px;margin:0 auto;">
    <header style="text-align:center;margin:0 0 1.5rem;">
      {%- if section.settings.eyebrow != blank -%}
        <span style="font-size:.75rem;letter-spacing:.15em;text-transform:uppercase;color:var(--sl-accent,#0a5cff);font-weight:700;">{{ section.settings.eyebrow }}</span>
      {%- endif -%}
      <h2 style="margin:.25rem 0 0;font-size:clamp(1.5rem,3vw,2rem);">{{ section.settings.heading }}</h2>
      {%- if section.settings.subheading != blank -%}
        <p style="margin:.5rem auto 0;max-width:600px;opacity:.85;">{{ section.settings.subheading }}</p>
      {%- endif -%}
    </header>
    <style>
      @keyframes sl-pulse { 0% { box-shadow: 0 0 0 0 var(--sl-accent,#0a5cff); } 70% { box-shadow: 0 0 0 14px rgba(10,92,255,0); } 100% { box-shadow: 0 0 0 0 rgba(10,92,255,0); } }
      .sl-dot { animation: sl-pulse 1.8s ease-out infinite; }
    </style>
    <div style="display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));">
      {%- for block in section.blocks -%}
        <figure style="margin:0;position:relative;border-radius:.75rem;overflow:hidden;aspect-ratio:4/5;" {{ block.shopify_attributes }}>
          <img src="{{ block.settings.image | image_url: width: 800 | default: 'https://picsum.photos/seed/' | append: block.id | append: '/800/1000' }}" alt="{{ block.settings.alt | default: 'Shoppable customer photo' }}" loading="lazy" style="width:100%;height:100%;object-fit:cover;display:block;" />
          <details style="position:absolute;left:{{ block.settings.dot_x | default: 50 }}%;top:{{ block.settings.dot_y | default: 50 }}%;transform:translate(-50%,-50%);">
            <summary class="sl-dot" aria-label="Shop {{ block.settings.product_title | default: 'this product' }}" style="list-style:none;cursor:pointer;width:22px;height:22px;border-radius:50%;background:var(--sl-accent,#0a5cff);border:3px solid #fff;display:block;"></summary>
            <div style="position:absolute;top:calc(100% + .5rem);left:50%;transform:translateX(-50%);min-width:200px;padding:.75rem;background:#fff;color:#111;border-radius:.5rem;box-shadow:0 8px 24px rgba(0,0,0,.15);display:flex;gap:.6rem;align-items:center;">
              <img src="{{ block.settings.product_image | image_url: width: 120 | default: 'https://picsum.photos/seed/' | append: block.id | append: 'p/120/120' }}" alt="{{ block.settings.product_title }}" loading="lazy" style="width:2.75rem;height:2.75rem;border-radius:.25rem;object-fit:cover;flex:0 0 auto;" />
              <div style="display:flex;flex-direction:column;gap:.2rem;min-width:0;">
                <strong style="font-size:.85rem;">{{ block.settings.product_title | default: 'Product' }}</strong>
                <span style="font-size:.8rem;color:var(--sl-accent,#0a5cff);font-weight:700;">{{ block.settings.price | default: '$29.00' }}</span>
                <a href="{{ block.settings.product_link | default: '#' }}" style="font-size:.75rem;color:var(--sl-accent,#0a5cff);text-decoration:none;font-weight:600;">Shop now &rarr;</a>
              </div>
            </div>
          </details>
        </figure>
      {%- endfor -%}
    </div>
  </div>
</section>
{% schema %}
{
  "name": "Shoppable UGC Grid",
  "settings": [
    { "type": "text", "id": "eyebrow", "label": "Eyebrow", "default": "Shop the feed" },
    { "type": "text", "id": "heading", "label": "Heading", "default": "Shop real customer looks" },
    { "type": "text", "id": "subheading", "label": "Subheading", "default": "Tap a dot to shop the piece." }
  ],
  "blocks": [
    {
      "type": "look",
      "name": "Look",
      "settings": [
        { "type": "image_picker", "id": "image", "label": "Image" },
        { "type": "text", "id": "alt", "label": "Alt text", "default": "Shoppable customer photo" },
        { "type": "range", "id": "dot_x", "label": "Dot X %", "min": 0, "max": 100, "step": 1, "default": 50 },
        { "type": "range", "id": "dot_y", "label": "Dot Y %", "min": 0, "max": 100, "step": 1, "default": 50 },
        { "type": "image_picker", "id": "product_image", "label": "Product image" },
        { "type": "text", "id": "product_title", "label": "Product title", "default": "Product" },
        { "type": "text", "id": "price", "label": "Price", "default": "$29.00" },
        { "type": "url", "id": "product_link", "label": "Product link" }
      ]
    }
  ],
  "presets": [
    {
      "name": "Shoppable UGC Grid",
      "blocks": [
        { "type": "look" }, { "type": "look" }, { "type": "look" }, { "type": "look" }
      ]
    }
  ]
}
{% endschema %}

Internal notesTeam only

Freeform markdown notes visible only to signed-in team members. Separate from the public description.