Testimonials
Customer quotes in a masonry-style grid of cards, each with the person's name, role and avatar.
Installation
bash
npx bootcn add testimonialsbash
pnpm dlx bootcn add testimonialsbash
yarn dlx bootcn add testimonialsbash
bunx --bun bootcn add testimonialsThe CLI also installs the design tokens and these blocks and components: avatar. It prints the <link> and <script> tags to add to your layout.
Usage
Replace the quotes with real ones from your customers, with their permission. Use photos instead of initials with the Avatar component's <img> markup.
The cards flow into as many columns as fit (CSS columns), so quotes of different lengths pack neatly.
Accessibility
- Each quote is a
<figure>with<blockquote>and<figcaption>, which ties the person to their words. - Avatars are decorative (
aria-hidden), because the name is next to them. - Columns flow top to bottom, then left to right; the reading order follows the list.
Dependencies
- Bootstrap 5.3+ CSS.
themes/tokens/tokens.css.- The
avatarcomponent.
Source
The exact files the CLI installs (testimonials@1.0.0). View on GitHub · Report an issue
html
<section class="bootcn-testimonials" aria-labelledby="bootcn-testimonials-title">
<div class="bootcn-testimonials__header">
<h2 class="bootcn-testimonials__title" id="bootcn-testimonials-title">
Loved by teams who ship
</h2>
<p class="bootcn-testimonials__lead">
Developers and designers use Acme to build faster, with fewer surprises.
</p>
</div>
<ul class="bootcn-testimonials__grid">
<li class="bootcn-testimonials__item">
<figure class="bootcn-testimonials__card">
<blockquote class="bootcn-testimonials__quote">
<p>
“We moved our admin area to plain PHP with these blocks and shipped it in a week. The
dark mode just worked.”
</p>
</blockquote>
<figcaption class="bootcn-testimonials__author">
<span class="bootcn-avatar bootcn-avatar--sm" aria-hidden="true"
><span class="bootcn-avatar__fallback">EK</span></span
>
<span class="bootcn-testimonials__who">
<span class="bootcn-testimonials__name">Eleni Kosta</span>
<span class="bootcn-testimonials__role">CTO, Lumen Studio</span>
</span>
</figcaption>
</figure>
</li>
<li class="bootcn-testimonials__item">
<figure class="bootcn-testimonials__card">
<blockquote class="bootcn-testimonials__quote">
<p>“I finally have components I can paste into client projects without a build step.”</p>
</blockquote>
<figcaption class="bootcn-testimonials__author">
<span class="bootcn-avatar bootcn-avatar--sm" aria-hidden="true"
><span class="bootcn-avatar__fallback">NG</span></span
>
<span class="bootcn-testimonials__who">
<span class="bootcn-testimonials__name">Nikos Georgiou</span>
<span class="bootcn-testimonials__role">Freelance developer</span>
</span>
</figcaption>
</figure>
</li>
<li class="bootcn-testimonials__item">
<figure class="bootcn-testimonials__card">
<blockquote class="bootcn-testimonials__quote">
<p>“It looks like the design files. Spacing, borders and focus states are all there.”</p>
</blockquote>
<figcaption class="bootcn-testimonials__author">
<span class="bootcn-avatar bootcn-avatar--sm" aria-hidden="true"
><span class="bootcn-avatar__fallback">SD</span></span
>
<span class="bootcn-testimonials__who">
<span class="bootcn-testimonials__name">Sofia Dimou</span>
<span class="bootcn-testimonials__role">Product designer, Kappa Labs</span>
</span>
</figcaption>
</figure>
</li>
<li class="bootcn-testimonials__item">
<figure class="bootcn-testimonials__card">
<blockquote class="bootcn-testimonials__quote">
<p>
“Our landing page scores 100 on performance and accessibility. Nothing else to
configure.”
</p>
</blockquote>
<figcaption class="bootcn-testimonials__author">
<span class="bootcn-avatar bootcn-avatar--sm" aria-hidden="true"
><span class="bootcn-avatar__fallback">AI</span></span
>
<span class="bootcn-testimonials__who">
<span class="bootcn-testimonials__name">Alex Ioannou</span>
<span class="bootcn-testimonials__role">Founder, Harbor & Co</span>
</span>
</figcaption>
</figure>
</li>
<li class="bootcn-testimonials__item">
<figure class="bootcn-testimonials__card">
<blockquote class="bootcn-testimonials__quote">
<p>
“Because the code lives in our repository, reviews are simple and nothing changes under
us.”
</p>
</blockquote>
<figcaption class="bootcn-testimonials__author">
<span class="bootcn-avatar bootcn-avatar--sm" aria-hidden="true"
><span class="bootcn-avatar__fallback">MP</span></span
>
<span class="bootcn-testimonials__who">
<span class="bootcn-testimonials__name">Maria Papadopoulou</span>
<span class="bootcn-testimonials__role">Engineering lead, Orbit</span>
</span>
</figcaption>
</figure>
</li>
<li class="bootcn-testimonials__item">
<figure class="bootcn-testimonials__card">
<blockquote class="bootcn-testimonials__quote">
<p>
“The pricing table and the forms saved us days. Keyboard support was a nice surprise.”
</p>
</blockquote>
<figcaption class="bootcn-testimonials__author">
<span class="bootcn-avatar bootcn-avatar--sm" aria-hidden="true"
><span class="bootcn-avatar__fallback">KT</span></span
>
<span class="bootcn-testimonials__who">
<span class="bootcn-testimonials__name">Kostas Tsakalos</span>
<span class="bootcn-testimonials__role">Web developer, Mosaic</span>
</span>
</figcaption>
</figure>
</li>
</ul>
</section>css
.bootcn-testimonials__header {
max-width: 40rem;
margin: 0 auto 3rem;
text-align: center;
}
.bootcn-testimonials__eyebrow {
margin: 0 0 0.5rem;
color: var(--bootcn-muted-foreground);
font-size: 0.875rem;
font-weight: 600;
}
.bootcn-testimonials__title {
margin: 0;
font-size: 1.875rem;
font-weight: 700;
line-height: 1.2;
letter-spacing: -0.025em;
}
@media (min-width: 768px) {
.bootcn-testimonials__title {
font-size: 2.25rem;
}
}
.bootcn-testimonials__lead {
margin: 1rem 0 0;
color: var(--bootcn-muted-foreground);
font-size: 1.125rem;
line-height: 1.75rem;
}
.bootcn-testimonials {
padding: 4rem 0;
}
/* Masonry-style columns: as many 18rem columns as fit. */
.bootcn-testimonials__grid {
margin: 0;
padding: 0;
list-style: none;
column-gap: 1rem;
columns: 18rem;
}
.bootcn-testimonials__item {
margin-bottom: 1rem;
break-inside: avoid;
}
.bootcn-testimonials__card {
margin: 0;
padding: 1.5rem;
border: var(--bootcn-border-width) solid var(--bootcn-border-color);
border-radius: var(--bootcn-radius-xl);
background-color: var(--bootcn-background);
box-shadow: var(--bootcn-shadow-sm);
}
.bootcn-testimonials__quote {
margin: 0 0 1.25rem;
}
.bootcn-testimonials__quote p {
margin: 0;
font-size: 0.9375rem;
line-height: 1.6;
}
.bootcn-testimonials__author {
display: flex;
align-items: center;
gap: 0.75rem;
}
.bootcn-testimonials__who {
display: flex;
flex-direction: column;
min-width: 0;
}
.bootcn-testimonials__name {
font-size: 0.875rem;
font-weight: 600;
}
.bootcn-testimonials__role {
color: var(--bootcn-muted-foreground);
font-size: 0.8125rem;
}
