Back to Shopify Liquid
Review sliders
Shopify Liquid

Review sliders

This snippet implements a dual-layer infinite scrolling ticker designed for customer testimonials. It features two rows of reviews moving in opposite directions with CSS-only animations, including support for reviewer profile pictures and multi-line text within styled cards.

EasyReviewsTrustCROSocial ProofMarquee
166 lines · 8.0 KB
Setup 5–10 minutes 5 min read 166 lines
Key features
  • CSS-driven infinite horizontal scroll
  • Bi-directional animation (left and right)
  • Circular profile image placeholders
  • Responsive max-width container
  • Zero-dependency pure HTML/CSS implementation
Best use cases
  • Displaying social proof on the home page or product pages
  • Creating a "featured in" or "as seen on" logos bar
  • Highlighting customer testimonials in a high-energy ticker format
Compatibility
  • Shopify Online Store 2.0
  • Most Shopify themes

The code

Shopify Liquid
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6 <title>reviews Bar with Infinite Scroll</title>
7 <style>
8 .reviews-bar,
9 .reviews-barv2 {
10 width: 100%;
11 padding: 3px 0;
12 overflow: hidden;
13 white-space: nowrap;
14 position: relative;
15margin-top: 10px;
16max-width: 1500px;
17margin-right: auto;
18margin-left: auto;
19 }
20 .reviews-wrapper,
21 .reviews-wrapperv2 {
22 display: flex;
23 }
24 .reviews-wrapper {
25 animation: scroll-text 20s linear infinite;
26 }
27 .reviews-wrapperv2 {
28 animation: scroll-text-reverse 20s linear infinite;
29 }
30.reviews-text, .reviews-textv2 {
31 color: #000;
32 font-size: 12px;
33 font-weight: 500;
34 margin-right: 15px;
35 border: 2px solid #f2f2f2;
36 padding: 10px 30px;
37 border-radius: 5px;
38 display: flex;
39 flex-direction: row;
40 gap: 18px;
41 align-items: center;
42 justify-content: center;
43max-width: 300px;
44line-height: 15px;
45}
46
47 .profile-pictures {
48 width: 30px;
49 height: 30px;
50 border-radius: 50%;
51 object-fit: cover;
52 }
53 @keyframes scroll-text {
54 0% {
55 transform: translateX(0);
56 }
57 100% {
58 transform: translateX(-100%);
59 }
60 }
61 @keyframes scroll-text-reverse {
62 0% {
63 transform: translateX(-100%);
64 }
65 100% {
66 transform: translateX(0);
67 }
68 }
69 </style>
70 </head>
71 <body>
72 <div class="reviews-barv2">
73 <div class="reviews-wrapperv2">
74 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
75<span>review goes here<br>
76new line</span></div>
77 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
78<span>review goes here<br>
79new line</span></div>
80 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
81<span>review goes here<br>
82new line</span></div>
83 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
84<span>review goes here<br>
85new line</span></div>
86 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
87<span>review goes here<br>
88new line</span></div>
89 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
90<span>review goes here<br>
91new line</span></div>
92 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
93<span>review goes here<br>
94new line</span></div>
95 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
96<span>review goes here<br>
97new line</span></div>
98 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
99<span>review goes here<br>
100new line</span></div>
101 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
102<span>review goes here<br>
103new line</span></div>
104 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
105<span>review goes here<br>
106new line</span></div>
107 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
108<span>review goes here<br>
109new line</span></div>
110 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
111<span>review goes here<br>
112new line</span></div>
113 <div class="reviews-textv2"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
114<span>review goes here<br>
115new line</span></div>
116 </div>
117 </div>
118<div class="reviews-bar">
119 <div class="reviews-wrapper">
120 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
121<span>review goes here<br>
122new line</span></div>
123 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
124<span>review goes here<br>
125new line</span></div>
126 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
127<span>review goes here<br>
128new line</span></div>
129 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
130<span>review goes here<br>
131new line</span></div>
132 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
133<span>review goes here<br>
134new line</span></div>
135 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
136<span>review goes here<br>
137new line</span></div>
138 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
139<span>review goes here<br>
140new line</span></div>
141 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
142<span>review goes here<br>
143new line</span></div>
144 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
145<span>review goes here<br>
146new line</span></div>
147 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
148<span>review goes here<br>
149new line</span></div>
150 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
151<span>review goes here<br>
152new line</span></div>
153 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
154<span>review goes here<br>
155new line</span></div>
156 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
157<span>review goes here<br>
158new line</span></div>
159 <div class="reviews-text"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdwXtAOL0wCTsYOlr33hJX33swJ5ItWUmeRA&s"User Profile Picture" class="profile-pictures">
160<span>review goes here<br>
161new line</span></div>
162
163 </div>
164 </div>
165 </body>
166</html>

How to install Review sliders on your Shopify theme

This snippet belongs in sections/main-product.liquid, directly under the Add to cart button, where it reinforces the purchase decision. Expect the whole job to take about 5–10 minutes.

  1. 1From your Shopify admin, open Online Store → Themes, click the button on your live theme and choose Duplicate. Always work on a copy so you can roll back instantly.
  2. 2On the duplicated theme, click … → Edit code to open the theme code editor.
  3. 3Open sections/main-product.liquid in the file tree. If your theme uses different file names, search for the template that renders the area where you want the block to show up.
  4. 4Click Copy code on this page, then paste the snippet directly under the Add to cart button, where it reinforces the purchase decision.
  5. 5The snippet ships with its own scoped <style> block, so you do not need to touch base.css or theme.css. If you prefer to keep CSS centralised, move the contents of the style tag into your theme stylesheet and delete the inline block.
  6. 6Click Save, then hit Preview and check the block on desktop, tablet and mobile widths.
  7. 7When you are happy with the result, publish the duplicated theme from Online Store → Themes → Actions → Publish.

How to customise it

Every value below lives inside the snippet, so you can adapt Review sliders to your brand without touching the rest of the theme.

  • Colours — the snippet uses #000, #f2f2f2. Replace those values inside the style block with your brand palette, keeping at least a 4.5:1 contrast ratio between text and background so the block stays accessible.
  • Sizing — adjust the font-size values (12px) and the padding so the block carries the same visual weight as the elements around it.
  • Cornersborder-radius: 5px controls the roundness. Set it to 0 for a sharper editorial look, or increase it for a softer, app-like feel.
  • Images — replace the placeholder image URLs with your own assets. Upload them under Content → Files in Shopify admin and use the generated CDN URL, or reference a theme asset with {{ 'my-image.png' | asset_url }}.
  • Copy — rewrite the hard-coded text (for example “reviews Bar with Infinite Scroll”) in your own brand voice, and translate it if you sell in more than one language.

Common mistakes to avoid

These are the issues merchants run into most often when installing a snippet like this one.

  • Editing the live theme directly. Duplicate it first — a single unbalanced Liquid tag can take a storefront down mid-campaign.
  • Pasting the code into the wrong file. Dropped into layout/theme.liquid instead of sections/main-product.liquid, this block will render on every page of the store, including ones where it makes no sense.
  • Renaming the CSS classes in the markup but not in the style block, or vice versa. The class names have to match exactly or the styling silently disappears.
  • Leaving the demo images in place. They are hosted on third-party domains, can disappear at any time and slow the page down. Re-upload them to Shopify Files before going live.
  • Publishing without testing on a real phone. Most Shopify traffic is mobile, and layout problems almost always surface there first.

Performance notes

What this block costs you in load time, and how to keep that cost at zero.

  • The CSS is inline and scoped to this block, so it adds no extra network request. At a few kilobytes it has no measurable effect on your Lighthouse score.
  • Add loading="lazy" plus explicit width and height attributes to every image in the snippet. That prevents Cumulative Layout Shift, which is a Core Web Vitals ranking factor.
  • The animation runs on CSS keyframes. Animate only transform and opacity where you can — animating width, height or top forces a layout recalculation on every frame.
  • Third-party image URLs bypass the Shopify CDN and add extra DNS lookups. Self-hosting those assets usually saves 100–300ms on first paint.
  • Run PageSpeed Insights before and after you add the block so you have a concrete number rather than a guess.

SEO & accessibility

How to add this block without damaging your on-page structure or your rich results.

  • Nothing in this snippet should replace your page <h1>. Keep product and page headings intact and use <h2> or <h3> for the block's own heading so the document outline stays clean.
  • Write a descriptive alt attribute for every image. Empty or generic alt text is one of the most common accessibility and SEO issues on Shopify stores.
  • If the block shows review or rating content, keep it consistent with the structured data your review app already outputs. Duplicating or contradicting rating markup can cost you the rich result entirely.
  • The block does not create a new URL, so there is no canonical or indexing change to make. It improves on-page engagement signals rather than crawlability.
Frequently asked questions

Review sliders — questions merchants ask

Will this snippet work with my theme?

It is built with standard Liquid, HTML and CSS, so it works with Dawn and virtually every Online Store 2.0 theme, as well as most vintage themes. The only thing that changes between themes is the file you paste it into — if yours has no sections/main-product.liquid, look for the equivalent template that renders the same area.

Do I need an app to use it?

No. This is theme code you own outright: no monthly fee, no third-party script tag, and no app that can break your storefront the next time it updates.

How long does it take to add “Review sliders” to a store?

Most merchants have it live in under fifteen minutes — duplicate the theme, paste the code, adjust the colours and copy, preview on mobile, publish.

The styling looks broken after pasting. How do I fix it?

Confirm you copied the whole snippet including the closing style tag, then check whether one of your theme's own CSS rules is overriding it. If a theme rule wins, increase the specificity of the snippet's selector rather than scattering !important through the file.

Will it slow my store down?

Not meaningfully. It is inline markup with scoped CSS and at most a few lines of vanilla JavaScript — no external libraries, no extra HTTP request. Optimising your product images will always have a far bigger impact on load time.

Can I use it on a client store or a commercial project?

Yes. Every snippet in the MCO Hub library is free to copy, modify and ship on any store, including client work. Attribution is appreciated but not required.

Related snippets

Keep exploring