Marketing sectionsTestimonialQuote
Searchastronomic.dev# TestimonialQuote
For one strong quote from a client, large on the page, with their name and role.
Static: no JavaScript.
## Usage
```astro
import TestimonialQuote from "@astronomic-dev/ui/components/TestimonialQuote.astro";
```
## Examples
### Client quote
One large quote on the open page, in the quote type role (text-quote) and display type: sized to its container, below the title role, so it never outweighs a section heading. One quote is not a list, so it sits in a plain box.
```astro
---
import TestimonialQuote from "@astronomic-dev/ui/components/TestimonialQuote.astro";
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TestimonialQuote
quote="They gave us a brand our team is proud of, and a site our sales team updates without calling anyone."
name="Sample Person"
role="Head of marketing"
company="Sample Co."
/>
</div>
```
### A short quote
One line: the quote sets the section's size.
```astro
---
import TestimonialQuote from "@astronomic-dev/ui/components/TestimonialQuote.astro";
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TestimonialQuote quote="They shipped our new site in three weeks." name="Sample Person" role="Head of marketing" company="Sample Co." />
</div>
```
### Centered, with a heading
align="center" moves the header, the quote and the caption together. The eyebrow and the heading make it a section.
```astro
---
import Badge from "@astronomic-dev/ui/components/Badge.astro";
import TestimonialQuote from "@astronomic-dev/ui/components/TestimonialQuote.astro";
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TestimonialQuote
heading="What clients say"
align="center"
quote="They shipped our new site in three weeks, and we changed the whole color scheme the day before launch."
name="Sample Person"
role="Head of brand"
company="Sample Co."
>
<Badge slot="eyebrow">Clients</Badge>
</TestimonialQuote>
</div>
```
## Props
### TestimonialQuote
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `heading` | `string` | None | The section heading, in the title role in display type. Without it there is no section and no header: a plain <div> holds only the quotes. |
| `mark` | `string` | None | A short mark after the heading, such as "(12)" or "©2026", in small muted type. It sits beside the heading, outside it, so the heading's name stays plain. Shown only with a heading. |
| `markLabel` | `string` | None | What the mark says to a screen reader, such as "12 projects": the mark is then hidden from screen readers and this is read in its place. Without it, the mark is read as written. |
| `text` | `string` | None | One or two sentences under the heading, in the lead role, muted. Shown only with a heading. |
| `headingTag` | `"h2" \| "h3" \| "h4"` | `"h2"` | The heading element. A quote's title sits one level under it. |
| `tone` | `"page" \| "inverse"` | `"page"` | inverse on the inverse surface (Panel tone="inverse"): the heading and lead in its colors and its focus ring; TestimonialQuote's name and byline too. Without it, the page's colors, as before. |
| `class` | `string` | None | More classes for the root (the <section>, or the <div> without a heading), merged with cn(), so yours win on conflicts. The root is a named size container (inline-size containment): in a shrink-to-fit parent (inline-flex, a float, fit-content) it collapses, so give it a width there. |
| `quote` | `string` | None | Required. The words, as plain text. |
| `name` | `string` | None | Required. The person's name, first in the caption. |
| `role` | `string` | None | The person's role, after the name, muted. |
| `company` | `string` | None | The company, after the role, muted. |
| `meta` | `string[]` | None | Short facts about the person, shown in place of role and company, such as the town and the service: ["Oak Park", "Lawn care"] shows "Oak Park · Lawn care". The dots are hidden from a screen reader, which hears a comma. Empty entries are left out. |
| `avatar` | `UiImage \| false` | None | A photo of the person ({ src, alt, width?, height? }). Without it, initials show; `false` hides the avatar. |
| `title` | `string` | None | A short title above the quote, such as "Launched in three weeks", in the heading role. |
| `emphasis` | `boolean` | `false` | Turn one *phrase* in the heading, and one in the quote, into <em>: exactly two asterisks around text with no space inside, as in "I took *a proper holiday.*". Any other asterisks show as typed. Off by default, so both show as typed. How the <em> looks is the theme's. |
| `align` | `"start" \| "center"` | `"start"` | The header, the quote and the caption at the start, or centered. |
| `itemHeadingTag` | `"h2" \| "h3" \| "h4" \| "h5"` | `"h3"` | The title element when there is no heading. With a heading, the title sits one level under it. |
| Slot | Description |
| --- | --- |
| `eyebrow` | A short line above the heading, such as a Badge. Shown only with a heading. |
| `head` | A line above the title and the quote (data-testimonial-head), such as a star rating and where the review came from. An empty slot leaves no box. |
| `avatar` | Your own image element in place of the Avatar. It sits in an aria-hidden box, since the name is written next to it, so put nothing focusable in it. |
| `logo` | A company mark at the end of the caption. When company is set, give an image alt="" (an inline SVG aria-hidden="true"): the caption already names the company. |
Any other attribute goes on the <section>, or on the <div> without a heading.
## Accessibility
- With a heading, renders a <section> named by it, so it is a region landmark. The heading id is unique on the page.
- Without a heading, renders a plain <div>. Put your own heading above it.
- The quote is a <blockquote> in a <figure>, its caption the person. The avatar is hidden from a screen reader: the name is written next to it.
- A quote's title sits one level under the section heading (h2 gives h3). With no heading, it is an h3 unless you set itemHeadingTag.
- One quote is not a list: it sits in a plain <div>, so a screen reader hears no one-item list.
- With emphasis, the <em> is read as part of the quote.
TestimonialQuote
FreeFor one strong quote from a client, large on the page, with their name and role.
- File
- TestimonialQuote.astro
- Group
- Marketing sections
- Kind
- Static: no JavaScript
- Examples
- 3
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Client quote
One large quote on the open page, in the quote type role (text-quote) and display type: sized to its container, below the title role, so it never outweighs a section heading. One quote is not a list, so it sits in a plain box.
This preview did not load.
examples/testimonialquote/main.astro
---
import TestimonialQuote from "@astronomic-dev/ui/components/TestimonialQuote.astro";
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TestimonialQuote
quote="They gave us a brand our team is proud of, and a site our sales team updates without calling anyone."
name="Sample Person"
role="Head of marketing"
company="Sample Co."
/>
</div>A short quote
One line: the quote sets the section's size.
This preview did not load.
examples/testimonialquote/short.astro
---
import TestimonialQuote from "@astronomic-dev/ui/components/TestimonialQuote.astro";
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TestimonialQuote quote="They shipped our new site in three weeks." name="Sample Person" role="Head of marketing" company="Sample Co." />
</div>Centered, with a heading
align="center" moves the header, the quote and the caption together. The eyebrow and the heading make it a section.
This preview did not load.
examples/testimonialquote/centered.astro
---
import Badge from "@astronomic-dev/ui/components/Badge.astro";
import TestimonialQuote from "@astronomic-dev/ui/components/TestimonialQuote.astro";
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TestimonialQuote
heading="What clients say"
align="center"
quote="They shipped our new site in three weeks, and we changed the whole color scheme the day before launch."
name="Sample Person"
role="Head of brand"
company="Sample Co."
>
<Badge slot="eyebrow">Clients</Badge>
</TestimonialQuote>
</div>