
Customer Review
This snippet creates a stylized, single-testimonial card featuring a square profile image, a verified customer badge, and an animated dashed border. It uses CSS keyframe animations to create a subtle pulsing effect on the border to draw attention to positive social proof.
- Animated dashed border effect
- Google Material Symbols integration
- Responsive mobile styling
- Verified purchaser badge icon
- Self-contained CSS with unique scoping
- Highlighting a featured customer quote on a product page
- Adding social proof to a landing page or homepage section
- Showcasing verified buyer feedback near the Add to Cart button
- Most Shopify themes
The code
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>Customer Review</title>7 <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&icon_names=verified" />8 <style>9 body.unique-body-AzY123 {10 display: flex;11 justify-content: center;12 align-items: center;13 height: 100vh;14 margin: 0;15 background: linear-gradient(135deg, #fafafa, #e0e0e0); /* Yumuşak gri gradyan arka plan */16 }1718 /* Border animasyonunu tanımla */19 @keyframes borderAnimation {20 0% {21 border-color: #e0e0e0;22 box-shadow: 0 0 10px rgba(193, 199, 208, 0.3);23 }24 50% {25 border-color: #d3d3d3;26 box-shadow: 0 0 15px rgba(193, 199, 208, 0.3);27 }28 100% {29 border-color: #e0e0e0;30 box-shadow: 0 0 10px rgba(193, 199, 208, 0.3);31 }32 }3334 .unique-review-container-WsX456 {35 display: flex;36 align-items: center;37 background-color: #fafafa; /* Beyaz arka plan */38 border-radius: 12px;39 padding: 16px;40 font-size: 14px;41 color: #333; /* Metin rengi */42 max-width: 600px;43 width: 100%;44 margin: 2px 0;45 border: 2px dashed #e0e0e0; /* Daha açık gri border */46 animation: borderAnimation 2s infinite alternate; /* Border animasyonu */47 }4849 .unique-review-image-EdC789 {50 width: 50px;51 height: 50px;52 border-radius: 8px; /* Kare profil resmi */53 object-fit: cover;54 margin-right: 16px;55 border: 2px solid #e0e0e0; /* İnce gri border */56 }5758 .unique-review-content-RfV012 {59 display: flex;60 flex-direction: column;61 width: 100%;62 }6364 .unique-review-author-TgB345 {65 display: flex;66 align-items: center;67 margin-bottom: 8px;68 }6970 .unique-review-author-name-YhN678 {71 font-weight: bold;72 margin-right: 4px;73 display: flex;74 align-items: center;75 }7677 .unique-review-icon-JqL456 {78 font-size: 16px; /* İkon boyutu */79 color: #1DA1F2; /* Mavi onay işareti rengi */80 margin-left: 4px;81 }8283 .unique-review-text-KiL234 {84 font-size: 14px;85 color: #555; /* Hafif daha koyu gri metin rengi */86 }8788 /* Mobil versiyon için daha küçük metin boyutları */89 @media (max-width: 768px) {90 .unique-review-container-WsX456 {91 padding: 12px;92 font-size: 12px; /* Genel metin boyutunu küçült */93 }9495 .unique-review-text-KiL234 {96 font-size: 12px; /* Yorum metni daha küçük */97 }98 }99 </style>100</head>101<body class="unique-body-AzY123">102103<div class="unique-review-container-WsX456">104 <img class="unique-review-image-EdC789" src="https://i.hizliresim.com/je7b0fg.jpg" alt="Profil Resmi">105 <div class="unique-review-content-RfV012">106 <div class="unique-review-author-TgB345">107 <span class="unique-review-author-name-YhN678">108 Burkisoy109 <span class="unique-review-icon-JqL456 material-symbols-outlined">verified</span>110 </span>111 </div>112 <div class="unique-review-text-KiL234">113 I really liked it. The shopping experience in this store was seamless.114 </div>115 </div>116</div>117118</body>119</html>
How to install Customer Review 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.
- 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.
- 2On the duplicated theme, click … → Edit code to open the theme code editor.
- 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.
- 4Click Copy code on this page, then paste the snippet directly under the Add to cart button, where it reinforces the purchase decision.
- 5The snippet ships with its own scoped
<style>block, so you do not need to touchbase.cssortheme.css. If you prefer to keep CSS centralised, move the contents of the style tag into your theme stylesheet and delete the inline block. - 6Click Save, then hit Preview and check the block on desktop, tablet and mobile widths.
- 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 Customer Review to your brand without touching the rest of the theme.
- Colours — the snippet uses
#fafafa,#e0e0e0,#d3d3d3,#333. 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. - Gradient — swap the
linear-gradient(...)declaration for a flat background colour if you want a more minimal, theme-native look. - Sizing — adjust the font-size values (14px, 16px, 12px) and the padding so the block carries the same visual weight as the elements around it.
- Corners —
border-radius: 12pxcontrols 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 “Customer Review”) in your own brand voice, and translate it if you sell in more than one language.
- Responsive behaviour — the
@mediaquery defines the mobile breakpoint. Adjust the pixel value if your theme uses a different breakpoint scale.
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.liquidinstead ofsections/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.
Customer Review — 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 “Customer Review” 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
Shopify Liquid
Tools



