Testimonial

Use testimonial to display a quote from a customer or user.

import {Testimonial} from '@primer/react-brand'

Examples

Default

Loading

Variants

For an alternative visual appearance and layout, without altering semantic meaning.

Loading

A logo (or similar) visual can be provided as an alternative to avatars.

Loading

Size

Use size to alternate the text size. Available options are small (default) and large.

Loading

Layout

Testimonial will expand to fill the width of its parent by default.

Use Stack to help position multiple, adjacent Testimonials alongside one another.

Loading

Use the expressive variant to place the quote on the left and the attribution on the right.

Loading

Position

Pass additional content about the testimonial provider using position.

Loading

Component props

Testimonial Required

Testimonial passes contextual data to its child inputs, labels, validation messaging and more.

NameTypeDefaultDescription
children'Testimonial.Quote'
'Testimonial.Name'
'Testimonial.Logo'
'Testimonial.Avatar'
'React.ReactNode'
Valid child nodes
classNamestringSets a custom class
quoteMarkClassNamestringClass applied to the quote mark.
mediaClassNamestringClass applied to the attribution wrapper.
idstringSets a custom id
refReact.RefObjectForward a Ref to the underlying DOM node
size'small'
'large'
'small'Set size of quote’s text
quoteMarkColor'default'
'blue'
'coral'
'green'
'gray'
'indigo'
'lemon'
'lime'
'orange'
'pink'
'purple'
'red'
'teal'
'yellow'
'green'Solid color of the quote mark.
variant'subtle'
'default'
'minimal'
'expressive'
'minimal'Alternative visual appearance.
hasBorderbooleantrueApplies an optional border where a variant supports it.

Testimonial.Name Required

Testimonial.Name indicates the name of the person (or organisation) that provided the testimonial.

NameTypeDefaultDescription
childrenstringLabel text
classNamestringApplies a custom class
idstringSets a custom id
refReact.RefObjectForward a Ref to the underlying DOM node
positionstringOptional. Applies additional content adjancent to the primary text.

Testimonial.Avatar

Testimonial.Avatar represent users or organizations.

NameTypeDefaultDescription
childrenstringLabel text
classNamestringApplies a custom class
idstringSets a custom id
refReact.RefObjectForward a Ref to the underlying DOM node
srcstringRequired. A url to the user or organisations GitHub profile avatar
altstringRequired. Applied as alt text to the avatar.

Testimonial.Logo passes a visual that represents the users or organizations.

NameTypeDefaultDescription
children'SVGElement'
'HTMLImageElement'
Accepts <img> and <svg> HTML elements as children.
classNamestringApplies a custom class
idstringSets a custom id
refReact.RefObjectForward a Ref to the underlying DOM node