Testimonials
Let real experiences do the talking. Quotes with clear attribution.
<div class="testimonials">
<div><div>We spent our time on the experience, not on configuring another framework.</div><div>Mira Patel, frontend engineer<br>Illustrative testimonial</div></div>
<div><div>Finally, a starting point that is as straightforward as the web itself.</div><div>Luca Moretti, independent designer<br>Illustrative testimonial</div></div>
</div>.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1rem; }
.testimonials figure { margin: 0; padding: 2rem; border: 1px solid var(--border); border-radius: var(--radius); }
.testimonials blockquote { margin: 0 0 1.5rem; font-size: 1.2rem; letter-spacing: -0.025em; }
.testimonials figcaption { color: var(--muted-foreground); font-size: 12px; }export default function decorate(block) {
if (block.querySelector('figure')) return;
[...block.children].forEach((row) => {
const [quote, attribution] = row.children;
if (!quote || !attribution) return;
const figure = document.createElement('figure');
const text = document.createElement('blockquote');
text.append(...quote.childNodes);
const caption = document.createElement('figcaption');
caption.append(...attribution.childNodes);
figure.append(text, caption);
row.replaceWith(figure);
});
}Installation
Run the source CLI from a Blocks UI checkout. This package is not published to npm.
node packages/cli/index.js add testimonialsOr copy the source files above. Include tokens.css and base.css once in your project.
Usage
Use the authored row-and-column structure, then let the standalone runtime discover and enhance the block.
<div class="testimonials">
<div><div>We spent our time on the experience, not on configuring another framework.</div><div>Mira Patel, frontend engineer<br>Illustrative testimonial</div></div>
<div><div>Finally, a starting point that is as straightforward as the web itself.</div><div>Luca Moretti, independent designer<br>Illustrative testimonial</div></div>
</div>import decorate from './blocks/testimonials/testimonials.js';
document.querySelectorAll('.testimonials').forEach(decorate);Variants
Choose a variant in the live preview. Add its class to the authored block.
defaultAccessibility & behavior
Semantic HTML, visible focus states, shared contrast-aware tokens, and responsive styles provide an accessible foundation. Preserve labels and heading hierarchy when customizing.
Multiple instances are supported. Layouts adapt to smaller viewports. No npm dependencies are required at runtime.
AEM usage
Copy the canonical CSS and JavaScript into your EDS block folder. Use the same row-and-column authoring structure shown above and let your existing AEM loader call the default decorator.
Standalone verified. EDS markup compatible. Live AEM integration has not been verified.