Dental — Reviews Testimonials
A trust-first patient reviews section for a dental clinic: an aggregate star-rating summary with a five-bar breakdown, filterable testimonial cards carrying Google and Yelp source badges plus verified-patient marks, and a keyboard-accessible carousel of featured smiles. Clean clinical light theme, smooth micro-interactions, dot navigation, autoplay pause on hover, and a toast helper — a reassuring, polished social-proof block ready to drop into a practice site.
MCP
Code
:root {
--blue: #2563eb;
--blue-d: #1d4ed8;
--blue-50: #eff5ff;
--mint: #34d399;
--mint-50: #e8fbf3;
--ink: #0f2740;
--ink-2: #3a5169;
--muted: #6b7c90;
--bg: #f3f8ff;
--white: #fff;
--line: rgba(15, 39, 64, 0.10);
--line-2: rgba(15, 39, 64, 0.18);
--ok: #22b07d;
--warn: #d98a2b;
--danger: #e05252;
--gold: #f6b73c;
--r-sm: 8px;
--r-md: 14px;
--r-lg: 22px;
--sh-sm: 0 2px 8px rgba(15, 39, 64, 0.06);
--sh-md: 0 10px 30px rgba(15, 39, 64, 0.10);
--sh-lg: 0 22px 60px rgba(15, 39, 64, 0.14);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
margin: 0;
font-family: "Inter", system-ui, -apple-system, sans-serif;
line-height: 1.5;
color: var(--ink);
background:
radial-gradient(1100px 520px at 12% -10%, #e4f0ff 0%, transparent 60%),
radial-gradient(900px 500px at 100% 0%, var(--mint-50) 0%, transparent 55%),
var(--bg);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
min-height: 100vh;
}
.wrap {
max-width: 1060px;
margin: 0 auto;
padding: 56px 22px 80px;
}
/* ---- Header ---- */
.head { text-align: center; margin-bottom: 34px; }
.eyebrow {
margin: 0 0 8px;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--blue);
}
.head h1 {
margin: 0 0 10px;
font-size: clamp(28px, 5vw, 42px);
font-weight: 800;
letter-spacing: -0.02em;
}
.lede { margin: 0; color: var(--ink-2); font-size: 16px; }
/* ---- Summary ---- */
.summary {
display: grid;
grid-template-columns: 300px 1fr;
gap: 28px;
align-items: center;
background: var(--white);
border: 1px solid var(--line);
border-radius: var(--r-lg);
padding: 28px;
box-shadow: var(--sh-md);
margin-bottom: 34px;
}
.score { text-align: center; padding-right: 28px; border-right: 1px solid var(--line); }
.score-num {
font-size: 64px;
font-weight: 800;
line-height: 1;
letter-spacing: -0.03em;
color: var(--ink);
}
.stars { display: inline-flex; gap: 3px; margin: 10px 0 6px; }
.star {
width: 22px; height: 22px;
background: var(--line-2);
-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/></svg>") center/contain no-repeat;
mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/></svg>") center/contain no-repeat;
}
.star.on { background: var(--gold); }
.star.nine { background: linear-gradient(90deg, var(--gold) 88%, var(--line-2) 88%); }
.score-sub { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.score-sub strong { color: var(--ink); }
.sources { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pill {
display: inline-flex; align-items: center; gap: 6px;
font-size: 12.5px; font-weight: 600;
padding: 6px 11px; border-radius: 999px;
border: 1px solid var(--line);
background: var(--blue-50); color: var(--ink-2);
}
.pill .glyph {
display: inline-grid; place-items: center;
width: 17px; height: 17px; border-radius: 50%;
font-size: 11px; font-weight: 800; color: #fff;
}
.pill.google .glyph { background: #4285f4; }
.pill.yelp .glyph { background: #d32323; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 30px 1fr 42px; align-items: center; gap: 12px; }
.bar-lbl { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.bar-lbl .s {
width: 13px; height: 13px; background: var(--gold);
-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/></svg>") center/contain no-repeat;
mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/></svg>") center/contain no-repeat;
}
.track { height: 9px; background: var(--blue-50); border-radius: 999px; overflow: hidden; }
.fill {
display: block; height: 100%; width: 0;
border-radius: 999px;
background: linear-gradient(90deg, var(--blue), var(--mint));
animation: grow 1s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes grow { to { width: var(--w); } }
.bar-pct { font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: right; }
/* ---- Section heads ---- */
h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
/* ---- Carousel ---- */
.featured { margin-bottom: 40px; }
.feat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.feat-nav { display: flex; gap: 8px; }
.nav-btn {
width: 42px; height: 42px; border-radius: 50%;
border: 1px solid var(--line-2); background: var(--white);
color: var(--ink); font-size: 18px; cursor: pointer;
display: grid; place-items: center;
transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.nav-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--sh-md); }
.nav-btn:active { transform: translateY(0); }
.viewport { overflow: hidden; border-radius: var(--r-lg); }
.rail { display: flex; margin: 0; padding: 0; list-style: none; transition: transform .5s cubic-bezier(.22,.61,.36,1); }
.slide { min-width: 100%; padding: 4px; }
.slide-card {
background: var(--white);
border: 1px solid var(--line);
border-radius: var(--r-lg);
padding: 34px 36px;
box-shadow: var(--sh-md);
display: grid;
grid-template-columns: auto 1fr;
gap: 22px;
align-items: start;
}
.slide-avatar {
width: 66px; height: 66px; border-radius: 50%;
display: grid; place-items: center;
font-weight: 800; font-size: 22px; color: #fff;
box-shadow: var(--sh-sm);
}
.slide-quote { margin: 0 0 16px; font-size: clamp(17px, 2.2vw, 20px); line-height: 1.55; color: var(--ink); font-weight: 500; }
.slide-quote::before { content: "\201C"; color: var(--blue); font-weight: 800; }
.slide-quote::after { content: "\201D"; color: var(--blue); font-weight: 800; }
.slide-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.slide-name { font-weight: 700; }
.slide-role { font-size: 13px; color: var(--muted); }
.mini-stars { display: inline-flex; gap: 2px; }
.mini-stars .star { width: 15px; height: 15px; }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.dot {
width: 9px; height: 9px; padding: 0; border: none; border-radius: 999px;
background: var(--line-2); cursor: pointer;
transition: width .25s ease, background .25s ease;
}
.dot.is-active { width: 26px; background: var(--blue); }
/* ---- Reviews grid ---- */
.rev-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
border: 1px solid var(--line-2); background: var(--white);
color: var(--ink-2); font-family: inherit; font-size: 13px; font-weight: 600;
padding: 8px 14px; border-radius: 999px; cursor: pointer;
transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.is-active { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: var(--sh-sm); }
.chip:active { transform: scale(.96); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card {
background: var(--white);
border: 1px solid var(--line);
border-radius: var(--r-md);
padding: 20px 20px 18px;
box-shadow: var(--sh-sm);
display: flex; flex-direction: column; gap: 12px;
transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
animation: pop .35s ease both;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--line-2); }
.card-top { display: flex; align-items: center; gap: 12px; }
.avatar {
width: 42px; height: 42px; border-radius: 50%;
display: grid; place-items: center;
font-weight: 700; font-size: 15px; color: #fff; flex: 0 0 auto;
}
.who { min-width: 0; }
.who .name { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.verified { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 9px; font-weight: 800; }
.who .date { font-size: 12px; color: var(--muted); }
.card-src { margin-left: auto; flex: 0 0 auto; }
.src-badge {
display: inline-grid; place-items: center;
width: 26px; height: 26px; border-radius: 8px;
font-size: 13px; font-weight: 800; color: #fff;
}
.src-badge.google { background: #4285f4; }
.src-badge.yelp { background: #d32323; }
.card-stars { display: inline-flex; gap: 2px; }
.card-stars .star { width: 16px; height: 16px; }
.card p.text { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.tag {
font-size: 11.5px; font-weight: 600; color: var(--blue);
background: var(--blue-50); border: 1px solid var(--line);
padding: 4px 10px; border-radius: 999px;
}
.copy-btn {
border: none; background: none; cursor: pointer;
color: var(--muted); font-family: inherit; font-size: 12.5px; font-weight: 600;
display: inline-flex; align-items: center; gap: 5px;
padding: 4px 6px; border-radius: 6px;
transition: color .15s ease, background .15s ease;
}
.copy-btn:hover { color: var(--blue); background: var(--blue-50); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-weight: 500; }
/* ---- Focus ---- */
:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.45); outline-offset: 2px; border-radius: 6px; }
/* ---- Toast ---- */
.toast {
position: fixed; left: 50%; bottom: 26px;
transform: translate(-50%, 24px);
background: var(--ink); color: #fff;
font-size: 14px; font-weight: 600;
padding: 12px 20px; border-radius: 999px;
box-shadow: var(--sh-lg);
opacity: 0; pointer-events: none;
transition: opacity .25s ease, transform .25s ease;
z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* ---- Responsive ---- */
@media (max-width: 760px) {
.summary { grid-template-columns: 1fr; }
.score { padding-right: 0; border-right: none; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
.wrap { padding: 40px 16px 64px; }
.slide-card { grid-template-columns: 1fr; padding: 24px 22px; text-align: left; }
.slide-avatar { width: 56px; height: 56px; font-size: 19px; }
.grid { grid-template-columns: 1fr; }
.feat-head h2 { font-size: 18px; }
.score-num { font-size: 54px; }
.nav-btn { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
* { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}(function () {
"use strict";
/* ---------- Data ---------- */
var GRAD = [
"linear-gradient(135deg,#2563eb,#34d399)",
"linear-gradient(135deg,#1d4ed8,#60a5fa)",
"linear-gradient(135deg,#34d399,#22b07d)",
"linear-gradient(135deg,#6366f1,#2563eb)",
"linear-gradient(135deg,#0ea5e9,#34d399)",
"linear-gradient(135deg,#f6b73c,#e05252)"
];
var featured = [
{
name: "Marisol Alvarez", role: "Invisalign patient · 8 months in",
grad: GRAD[0], rating: 5,
quote: "I was terrified of the dentist for years. Dr. Nguyen and the team walked me through every single step of my Invisalign plan. My smile has completely transformed and I finally look forward to my check-ups."
},
{
name: "Daniel Okonkwo", role: "Dental implant patient",
grad: GRAD[3], rating: 5,
quote: "Lost a tooth in a cycling accident and thought I'd never smile the same. The implant is flawless — you honestly cannot tell which one is real. Painless, professional, and the follow-up care was outstanding."
},
{
name: "Priya Raman", role: "Family of four · 3 years",
grad: GRAD[2], rating: 5,
quote: "Brightsmile is the only clinic my whole family trusts. The kids actually ask to go. Clean, calm, on-time appointments, and they never push treatments we don't need. Genuinely the best care we've had."
}
];
var reviews = [
{ name: "Grace Halloran", initials: "GH", grad: GRAD[0], source: "google", rating: 5, date: "2 days ago", treatment: "Whitening", verified: true,
text: "Three shades brighter after one visit and zero sensitivity. The hygienist explained aftercare so clearly. Booking online took thirty seconds." },
{ name: "Tomas Berg", initials: "TB", grad: GRAD[1], source: "yelp", rating: 5, date: "5 days ago", treatment: "Cleaning", verified: true,
text: "Most thorough cleaning I've had in a decade, and the reminder texts mean I never miss an appointment anymore. Front desk is lovely." },
{ name: "Aisha Rahman", initials: "AR", grad: GRAD[2], source: "google", rating: 5, date: "1 week ago", treatment: "Invisalign", verified: true,
text: "Halfway through my Invisalign and already thrilled. Dr. Nguyen answered every anxious question I had. The 3D scan preview sold me." },
{ name: "Leo Mancini", initials: "LM", grad: GRAD[3], source: "yelp", rating: 4, date: "1 week ago", treatment: "Implants", verified: true,
text: "Implant procedure was smoother than expected. One follow-up ran a little late, but the result is excellent and the team was apologetic." },
{ name: "Hannah Weiss", initials: "HW", grad: GRAD[4], source: "google", rating: 5, date: "2 weeks ago", treatment: "Cleaning", verified: true,
text: "Brought my nervous 7-year-old and they were so patient with him. He left with a sticker and a big smile. We're patients for life." },
{ name: "Marcus Bell", initials: "MB", grad: GRAD[5], source: "google", rating: 5, date: "3 weeks ago", treatment: "Whitening", verified: true,
text: "Professional whitening was worth every penny. Results lasted through the holidays and the office is spotless and modern." },
{ name: "Sofia Duarte", initials: "SD", grad: GRAD[0], source: "yelp", rating: 5, date: "3 weeks ago", treatment: "Implants", verified: true,
text: "Two implants done over the summer. Clear cost breakdown up front — no surprise bills. Confident enough to smile in photos again." },
{ name: "Kenji Watanabe", initials: "KW", grad: GRAD[2], source: "google", rating: 5, date: "1 month ago", treatment: "Invisalign", verified: true,
text: "The digital treatment plan let me see the end result before starting. Aligners are comfortable and the check-ins are quick and easy." }
];
/* ---------- Helpers ---------- */
var $ = function (s, c) { return (c || document).querySelector(s); };
var $$ = function (s, c) { return Array.prototype.slice.call((c || document).querySelectorAll(s)); };
var toastEl = $("#toast");
var toastTimer;
function toast(msg) {
toastEl.textContent = msg;
toastEl.classList.add("show");
clearTimeout(toastTimer);
toastTimer = setTimeout(function () { toastEl.classList.remove("show"); }, 2200);
}
function starsHtml(n) {
var out = "";
for (var i = 1; i <= 5; i++) out += '<span class="star ' + (i <= n ? "on" : "") + '"></span>';
return out;
}
/* ---------- Render review cards ---------- */
var grid = $("#grid");
var emptyMsg = $("#empty");
function cardHtml(r) {
return (
'<article class="card" data-source="' + r.source + '" data-treatment="' + r.treatment + '">' +
'<div class="card-top">' +
'<span class="avatar" style="background:' + r.grad + '" aria-hidden="true">' + r.initials + "</span>" +
'<span class="who">' +
'<span class="name">' + r.name + (r.verified ? '<span class="verified" title="Verified patient" aria-label="Verified patient">✓</span>' : "") + "</span>" +
'<span class="date">' + r.date + "</span>" +
"</span>" +
'<span class="card-src"><span class="src-badge ' + r.source + '" title="' + (r.source === "google" ? "Google review" : "Yelp review") + '">' + (r.source === "google" ? "G" : "Y") + "</span></span>" +
"</div>" +
'<div class="card-stars" role="img" aria-label="Rated ' + r.rating + ' out of 5">' + starsHtml(r.rating) + "</div>" +
'<p class="text">' + r.text + "</p>" +
'<div class="card-foot">' +
'<span class="tag">' + r.treatment + "</span>" +
'<button class="copy-btn" type="button" data-name="' + r.name + '">🔗 Copy link</button>' +
"</div>" +
"</article>"
);
}
function renderGrid(filter) {
var visible = reviews.filter(function (r) {
if (filter === "all") return true;
if (filter === "google" || filter === "yelp") return r.source === filter;
return r.treatment === filter;
});
grid.innerHTML = visible.map(cardHtml).join("");
emptyMsg.hidden = visible.length !== 0;
}
renderGrid("all");
/* ---------- Filter chips ---------- */
$("#chips").addEventListener("click", function (e) {
var chip = e.target.closest(".chip");
if (!chip) return;
$$(".chip").forEach(function (c) {
c.classList.remove("is-active");
c.setAttribute("aria-pressed", "false");
});
chip.classList.add("is-active");
chip.setAttribute("aria-pressed", "true");
renderGrid(chip.dataset.filter);
});
/* ---------- Copy link (event delegation) ---------- */
grid.addEventListener("click", function (e) {
var btn = e.target.closest(".copy-btn");
if (!btn) return;
var link = "https://brightsmile.example/reviews#" +
btn.dataset.name.toLowerCase().replace(/\s+/g, "-");
var done = function () { toast("Review link copied to clipboard"); };
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(link).then(done, done);
} else {
done();
}
});
/* ---------- Carousel ---------- */
var rail = $("#rail");
var dotsWrap = $("#dots");
var viewport = $("#viewport");
var index = 0;
var count = featured.length;
rail.innerHTML = featured.map(function (f, i) {
return (
'<li class="slide" role="group" aria-roledescription="slide" aria-label="' + (i + 1) + " of " + count + '">' +
'<div class="slide-card">' +
'<span class="slide-avatar" style="background:' + f.grad + '" aria-hidden="true">' +
f.name.split(" ").map(function (w) { return w[0]; }).join("").slice(0, 2) +
"</span>" +
"<div>" +
'<p class="slide-quote">' + f.quote + "</p>" +
'<div class="slide-meta">' +
'<span class="mini-stars" role="img" aria-label="Rated ' + f.rating + ' out of 5">' + starsHtml(f.rating) + "</span>" +
'<span class="slide-name">' + f.name + "</span>" +
'<span class="slide-role">' + f.role + "</span>" +
"</div>" +
"</div>" +
"</div>" +
"</li>"
);
}).join("");
dotsWrap.innerHTML = featured.map(function (f, i) {
return '<button class="dot' + (i === 0 ? " is-active" : "") +
'" role="tab" aria-label="Go to testimonial ' + (i + 1) +
'" aria-selected="' + (i === 0) + '"></button>';
}).join("");
var dots = $$(".dot", dotsWrap);
function go(i) {
index = (i + count) % count;
rail.style.transform = "translateX(-" + index * 100 + "%)";
dots.forEach(function (d, di) {
var active = di === index;
d.classList.toggle("is-active", active);
d.setAttribute("aria-selected", String(active));
});
}
$("#next").addEventListener("click", function () { go(index + 1); restart(); });
$("#prev").addEventListener("click", function () { go(index - 1); restart(); });
dots.forEach(function (d, i) {
d.addEventListener("click", function () { go(i); restart(); });
});
/* Keyboard arrows on the carousel */
$(".featured").addEventListener("keydown", function (e) {
if (e.key === "ArrowRight") { go(index + 1); restart(); }
else if (e.key === "ArrowLeft") { go(index - 1); restart(); }
});
/* Autoplay with pause on hover / focus */
var timer;
function play() { timer = setInterval(function () { go(index + 1); }, 5500); }
function stop() { clearInterval(timer); }
function restart() { stop(); play(); }
viewport.addEventListener("mouseenter", stop);
viewport.addEventListener("mouseleave", play);
$(".featured").addEventListener("focusin", stop);
$(".featured").addEventListener("focusout", play);
document.addEventListener("visibilitychange", function () {
if (document.hidden) stop(); else play();
});
play();
})();<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Brightsmile Dental — Patient Reviews</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<main class="wrap">
<header class="head">
<p class="eyebrow">Patient stories</p>
<h1>What our patients say</h1>
<p class="lede">Real reviews from real smiles at Brightsmile Dental. Verified from Google & Yelp.</p>
</header>
<!-- Summary -->
<section class="summary" aria-label="Rating summary">
<div class="score">
<div class="score-num">4.9</div>
<div class="stars" role="img" aria-label="Rated 4.9 out of 5 stars">
<span class="star on"></span><span class="star on"></span><span class="star on"></span><span class="star on"></span><span class="star nine"></span>
</div>
<p class="score-sub">Based on <strong>1,284</strong> verified reviews</p>
<div class="sources">
<span class="pill google"><span class="glyph">G</span> 4.9 · Google</span>
<span class="pill yelp"><span class="glyph">Y</span> 4.8 · Yelp</span>
</div>
</div>
<div class="bars" aria-label="Rating breakdown">
<div class="bar-row"><span class="bar-lbl">5<span class="s"></span></span><span class="track"><span class="fill" style="--w:88%"></span></span><span class="bar-pct">88%</span></div>
<div class="bar-row"><span class="bar-lbl">4<span class="s"></span></span><span class="track"><span class="fill" style="--w:9%"></span></span><span class="bar-pct">9%</span></div>
<div class="bar-row"><span class="bar-lbl">3<span class="s"></span></span><span class="track"><span class="fill" style="--w:2%"></span></span><span class="bar-pct">2%</span></div>
<div class="bar-row"><span class="bar-lbl">2<span class="s"></span></span><span class="track"><span class="fill" style="--w:1%"></span></span><span class="bar-pct">1%</span></div>
<div class="bar-row"><span class="bar-lbl">1<span class="s"></span></span><span class="track"><span class="fill" style="--w:0%"></span></span><span class="bar-pct">0%</span></div>
</div>
</section>
<!-- Carousel -->
<section class="featured" aria-roledescription="carousel" aria-label="Featured testimonials">
<div class="feat-head">
<h2>Featured stories</h2>
<div class="feat-nav">
<button class="nav-btn" id="prev" aria-label="Previous testimonial">←</button>
<button class="nav-btn" id="next" aria-label="Next testimonial">→</button>
</div>
</div>
<div class="viewport" id="viewport">
<ul class="rail" id="rail"><!-- slides injected --></ul>
</div>
<div class="dots" id="dots" role="tablist" aria-label="Choose testimonial"></div>
</section>
<!-- Filters + grid -->
<section class="reviews" aria-label="All reviews">
<div class="rev-head">
<h2>Recent reviews</h2>
<div class="chips" id="chips" role="group" aria-label="Filter reviews">
<button class="chip is-active" data-filter="all" aria-pressed="true">All</button>
<button class="chip" data-filter="google" aria-pressed="false">Google</button>
<button class="chip" data-filter="yelp" aria-pressed="false">Yelp</button>
<button class="chip" data-filter="Implants" aria-pressed="false">Implants</button>
<button class="chip" data-filter="Whitening" aria-pressed="false">Whitening</button>
<button class="chip" data-filter="Invisalign" aria-pressed="false">Invisalign</button>
<button class="chip" data-filter="Cleaning" aria-pressed="false">Cleaning</button>
</div>
</div>
<div class="grid" id="grid"><!-- cards injected --></div>
<p class="empty" id="empty" hidden>No reviews match that filter yet.</p>
</section>
</main>
<div class="toast" id="toast" role="status" aria-live="polite"></div>
<script src="script.js"></script>
</body>
</html>A social-proof block for a dental practice built around trust. The header pairs a large aggregate score (4.9 out of 5) with a live star row and a five-bar rating distribution, so visitors grasp overall sentiment at a glance. Beneath it, a responsive grid of testimonial cards shows real-feeling patient quotes, each stamped with a source badge (Google or Yelp), a verified-patient check, the treatment received, and a relative date.
Filter chips at the top of the grid let patients narrow reviews by source or by treatment type; counts update and cards animate in and out smoothly. A featured carousel highlights three longer testimonials with autoplay that pauses on hover and focus, previous/next controls, and clickable dots — all keyboard operable with visible focus rings and aria labels. A lightweight toast() helper confirms actions like copying a review link.
Everything is vanilla HTML, CSS, and JavaScript with no dependencies, using the clean clinical light palette: soft blues, mint accents, rounded cards, and generous white space. It is fully responsive down to about 360px, with an accessible contrast ratio and reduced-motion friendly transitions.
Illustrative UI only — not intended for real medical use.