Skip to main content
brickwork
GitHub Log in Get started
Display
Theme
Density
Direction
Brand

Documentation

Testimonial

A semantic quote card with optional attribution, avatar and logo.

All components Marketing Brickwork 4.3.1

Try it

Attributed quote

Open full-page preview

Quote with named author and accessible avatar.

The component contracts made our migration predictable.

Jordan Lee
Jordan Lee Engineering manager, Acme
Use for individual social proof. Use a page grid to arrange multiple testimonials.

Use it

Working invocation

This code creates the configuration shown above. Copy the template and the required Python context together.

templates/your_app/component.html

Django template

{% include "brickwork_marketing/components/_testimonial.html" %}

your_app/views.py

Python

context = {'quote': 'The component contracts made our migration predictable.', 'author': 'Jordan Lee', 'role': 'Engineering manager, Acme', 'avatar': '/static/people/jordan-lee.jpg'}

Guide

Add it to your project

  1. Use the public include path "brickwork_marketing/components/_testimonial.html" from the installed django-brickwork package.
  2. Include with quote, then optional attribution values.
  3. Give avatar only when author is present so its implied alt is useful.
  4. Pass safe logo HTML or extend the public logo block.
  5. When filling logo block, also provide author, role, avatar or logo context so the figcaption gate exists.

View this component's source for the installed release

Options

Public API

Option Type Default Required Description
quote string Not set Yes The testimonial quotation; without it the component emits no figure. Constraint: No additional template constraint beyond the documented type.
author string Not set No Attribution name for the testimonial. Constraint: No additional template constraint beyond the documented type.
role string Not set No Short attribution or position line below the name. Constraint: No additional template constraint beyond the documented type.
avatar image URL Not set No Image URL for the testimonial avatar; its alt text is the author. Constraint: Only supply a usable URL with a non-empty author, because the author becomes its alt text.

Named blocks

Fill these only when you extend the component template. They are not values passed to an include or tag.

Block What it replaces

Behaviour

Accessibility and responsive behaviour

Accessibility
Uses figure, blockquote and figcaption. Avatar alt is inferred from author; safe logo markup remains caller responsibility.
Responsive
No intrinsic breakpoint; a parent quote grid controls layout.
Without JavaScript
Static HTML; no JavaScript required.

Need help?

Troubleshooting

An overridden logo block is blank.

The attribution wrapper only exists when author, role, avatar, or logo is truthy. Provide normal attribution content; do not use a placeholder logo sentinel.

Explore next

Used in examples

Documentation