Card brand
One quote in a brand-colour card, with the person under it.
Last updated
---
/**
* Card brand: One quote in a brand-colour card, with the person under it.
*
* @block testimonials
* @order 2
*/
import Section from '@/components/apogee/Section/Section.astro'
import Avatar from '@/components/apogee/Avatar/Avatar.astro'
import type { TestimonialsContent } from '@/components/apogee/sections/_shared/testimonials.ts'
/** @composable */
interface Props extends TestimonialsContent {}
const {
items = [{ quote: 'We shipped our redesign in three weeks instead of three months. The team still talks about it.', name: 'Amara Nwosu', role: 'Head of Operations, Lumen', avatar: 'https://picsum.photos/id/1027/192/192', industry: 'Retail and commerce' }],
} = Astro.props
---
<Section spacing="large">
{items.slice(0, 1).map((t) => (
<figure class="flex flex-col items-center gap-8 rounded-2xl px-6 py-10 text-center md:px-8 md:py-12 lg:p-16 bg-primary text-on-primary">
{t.industry && <p class="text-sm font-semibold opacity-85">{t.industry}</p>}
<blockquote class="text-2xl font-medium tracking-tight text-balance md:text-4xl"><p>“{t.quote}”</p></blockquote>
<figcaption class="flex flex-col items-center gap-3 text-center"><Avatar src={t.avatar} name={t.name} alt="" size="large" border /><span class="flex flex-col items-center"><span class="flex items-center gap-1 font-semibold">{t.name}</span>{t.role && <span class="text-sm opacity-85">{t.role}</span>}</span></figcaption>
</figure>
))}
</Section>
Show codeHide code
---
/**
* Card brand: One quote in a brand-colour card, with the person under it.
*
* @block testimonials
* @order 2
*/
import Section from '@/components/apogee/Section/Section.astro'
import Avatar from '@/components/apogee/Avatar/Avatar.astro'
import type { TestimonialsContent } from '@/components/apogee/sections/_shared/testimonials.ts'
/** @composable */
interface Props extends TestimonialsContent {}
const {
items = [{ quote: 'We shipped our redesign in three weeks instead of three months. The team still talks about it.', name: 'Amara Nwosu', role: 'Head of Operations, Lumen', avatar: 'https://picsum.photos/id/1027/192/192', industry: 'Retail and commerce' }],
} = Astro.props
---
<Section spacing="large">
{items.slice(0, 1).map((t) => (
<figure class="flex flex-col items-center gap-8 rounded-2xl px-6 py-10 text-center md:px-8 md:py-12 lg:p-16 bg-primary text-on-primary">
{t.industry && <p class="text-sm font-semibold opacity-85">{t.industry}</p>}
<blockquote class="text-2xl font-medium tracking-tight text-balance md:text-4xl"><p>“{t.quote}”</p></blockquote>
<figcaption class="flex flex-col items-center gap-3 text-center"><Avatar src={t.avatar} name={t.name} alt="" size="large" border /><span class="flex flex-col items-center"><span class="flex items-center gap-1 font-semibold">{t.name}</span>{t.role && <span class="text-sm opacity-85">{t.role}</span>}</span></figcaption>
</figure>
))}
</Section>Add
npx @ava-ui/apogee add testimonials/card-brand
This copies the block to src/components/apogee/blocks/testimonials/ with everything it uses: Avatar, Section. Every piece of copy is a prop, with the sample copy as its default. Pass yours, or null to hide a part; see copy is props.
Accessibility
Related
TestimonialsOne featured quote, or a grid of quote cards.
CarouselA horizontal scroll-snap track for browsing slides. Native scroll and swipe work with zero JS; arrows, dots, and autoplay are progressive enhancement.
RatingA star rating on native radios — pick a value on a scale, or display one read-only.