webdevpuneet.com

Embla Auto-Scroll Logo Marquee: Two-Row Logo Strip

Embla Carousel Auto-Scroll Logo Marquee · Carousels · Plain HTML, CSS & JS · Live preview

About this UI Snippet

Embla Auto Scroll — A Logo Marquee You Can Also Grab

Screenshot of the Embla Carousel Auto-Scroll Logo Marquee snippet rendered live

Logo marquees are usually pure CSS animations: cheap, smooth, and impossible to interact with. Embla's Auto Scroll plugin gives the same continuous motion while keeping a real carousel underneath, so visitors can grab the strip, throw it, and let it carry on.

Continuous motion, not slide steps

EmblaCarouselAutoScroll({ speed }) moves the track a fixed number of pixels per frame instead of snapping between slides. Combined with loop: true and dragFree: true, the strip becomes an endless belt that can be dragged with momentum. direction: 'backward' on the second row makes the rows drift past each other.

Enough content to loop

Embla's loop needs slides that cover more than the viewport, otherwise it can't reposition slides out of sight. Ten logos might be too few on a wide screen, so each row renders its set twice.

Interaction settings

stopOnMouseEnter pauses while the pointer is over a row, so visitors can read a logo. stopOnInteraction: false resumes scrolling after a drag instead of stopping forever.

Pause and speed controls

A visible pause button (WCAG 2.2.2 requires one for motion longer than five seconds) calls plugin.stop() and plugin.play() on both rows. Speed is a plugin option, not a method, so the slider destroys each carousel and re-creates it with a fresh plugin, which is the documented way to change plugin options.

Soft edges

A horizontal mask-image gradient fades logos in and out at both ends, avoiding a hard cut at the container edge.

A section, not just a strip

The marquee sits inside a rounded card with a kicker pill, a headline and a one-line subtitle, and a footer row with three proof-point stats (rating, countries, uptime) beside the controls. Each logo is a white chip with a soft shadow that lifts and darkens on hover, and the placeholder marks use five shapes (square, circle, hexagon, diamond, triangle) with a gradient fill, so the demo reads like a real customer wall. The speed slider shows its current value (for example 1.2×), and the pause button swaps between a pause and a play icon.

What's included

Features

Auto Scroll plugin
Continuous pixel-per-frame motion.
Opposite-direction rows
direction: 'backward' on the second row.
Draggable with momentum
loop plus dragFree.
Hover pause
stopOnMouseEnter for reading.
Pause button
Stops both rows for motion-sensitive users.
Speed control
Slider with a live value label; re-initialises with a new plugin instance.
Edge fade mask
Soft appear and disappear at both sides.
Logo chips that lift
White chips with soft shadows rise and darken on hover.
Section layout
Kicker pill, headline, subtitle and a stats footer around the strip.
Shaped placeholder marks
Square, circle, hexagon, diamond and triangle marks with gradient fills.

Step by step

How to Use

  1. 1
    Load Embla and Auto ScrollInclude the core and embla-carousel-auto-scroll UMD builds.
  2. 2
    Paste the snippetTwo logo rows drift in opposite directions.
  3. 3
    Grab a rowDrag and release; it glides, then keeps scrolling.
  4. 4
    Pause or change speedUse the Pause/Play button and the speed slider (it shows the value, like 1.2×) under the rows.
  5. 5
    Add your logosReplace BRANDS with names, colours and a mark shape, or use img tags in the slides, then edit the headline, subtitle and stats.

Real-world uses

Common Use Cases

Trusted-by strip on a SaaS homepage
Show customer logos in two rows moving in opposite directions under the hero. Visitors can grab and throw the strip, which a pure CSS marquee cannot offer, and hovering pauses it for reading.
Conference sponsor and partner wall
Rotate sponsor tiers on an event page instead of stacking them in a static grid. Give each row its own speed so premium sponsors stay on screen noticeably longer.
Press and as-seen-in mentions
Scroll publication logos as social proof in a footer band. The pause button gives motion-sensitive visitors a way to stop the strip, something CSS-only marquees rarely provide.
Integration and tool showcase
List the apps and APIs your product connects to as a continuous belt. It is a real Embla carousel underneath, so you can keep dragFree momentum or drop in your own logo markup.
Directory and marketplace headers
Show hundreds of listed brands or vendors in two endless rows so a directory homepage feels busy and trustworthy. Replace the logo markup with text chips to highlight categories instead of companies.
Related: Swiper Infinite Logo Marquee
Related: Logo Marquee (CSS)
A pure CSS animation: Logo Marquee.

Got questions?

Frequently Asked Questions

Use the embla-carousel-auto-scroll plugin with loop: true. It moves the carousel by a set speed each frame. Add dragFree: true so users can throw the strip and it keeps gliding.

Pass direction: 'backward' to the Auto Scroll plugin.

Embla's loop needs enough slides to fill more than the viewport so slides can be moved out of sight before they reappear. Repeating a short list prevents a gap on wide screens.

Speed is a plugin option, so destroy the carousel and re-create it with a new plugin instance using the new speed.

Motion that lasts more than five seconds should be pausable (WCAG 2.2.2). Provide a pause button, pause on hover, and don't autoplay for users who prefer reduced motion. Logos should have text alternatives when they are images.

Copy & paste

Source Code

<section class="eal">
  <div class="eal-head">
    <span class="eal-kicker">Customers</span>
    <h2 class="eal-title">Trusted by 4,000+ teams worldwide</h2>
    <p class="eal-sub">From fast-moving startups to global brands, teams ship with us every day.</p>
  </div>
  <div class="eal-row">
    <div class="eal-viewport" id="ealTop"><div class="eal-container" id="ealTopList"></div></div>
    <div class="eal-viewport" id="ealBottom"><div class="eal-container" id="ealBottomList"></div></div>
  </div>
  <div class="eal-foot">
    <div class="eal-stats">
      <div><b>4.9/5</b><span>average rating</span></div>
      <div><b>120+</b><span>countries</span></div>
      <div><b>99.9%</b><span>uptime</span></div>
    </div>
    <div class="eal-controls">
      <button type="button" id="ealToggle" aria-pressed="false"></button>
      <label>Speed <input type="range" id="ealSpeed" min="0.4" max="3" step="0.2" value="1.2"><output id="ealSpeedOut">1.2&times;</output></label>
    </div>
  </div>
</section>

Extend with AI

Take This Snippet Further With AI

Paste this snippet into an AI assistant like Claude and ask it to explain why the logo list is duplicated and why changing speed requires re-initialising. Ask it to use real SVG logos with alt text, link each logo to a case study, or slow the strip down while a logo is focused, or to add a second pair of rows for premium sponsors. It can also compare this with a pure CSS marquee for performance.

Prompt to recreate it

Copy this into your AI assistant of choice to build the effect from scratch, or as a jumping-off point for your own variant:

text
Build a two-row "trusted by" logo marquee with Embla Carousel v8 and its Auto Scroll plugin (loaded from a CDN as UMD) in plain HTML, CSS and JavaScript.

Requirements:
- Ten brand logos (a coloured mark and name), rendered twice per row so the loop never shows a gap.
- The top row scrolls forward and the bottom row backward, continuously, looping and draggable with momentum.
- Pause while hovered, resume after a drag, and don't autoplay when the user prefers reduced motion.
- A pause/play button with aria-pressed that stops or starts both rows.
- A speed slider that re-creates both carousels with a new plugin instance at the chosen speed.
- Fade logos in and out at both edges with a CSS mask.
- Present it as a section: a white rounded card with a soft gradient glow, a kicker pill, a headline ("Trusted by 4,000+ teams worldwide") and a subtitle above the rows.
- Style each logo as a white chip with a thin border and soft shadow that lifts, darkens its text and gains a shadow on hover. Give the placeholder marks gradient fills and vary their shape (square, circle, hexagon via clip-path, diamond, triangle).
- A footer row with three stats (4.9/5 average rating, 120+ countries, 99.9% uptime) on the left and the controls on the right, wrapping and centering on small screens.
- The pause button shows a pause or play SVG icon with its label, and the speed slider shows its current value next to it (for example 1.2×) updating as it moves.

Want to tighten it up first? Run this prompt through the AI Prompt Studio to score it across 8 quality dimensions, catch anti-patterns, and tune the wording for Claude, ChatGPT, or Gemini before you paste it in.