Testimonial
Use testimonial to display a quote from a customer or user.
On this page
On this page
import {Testimonial} from '@primer/react-brand'
Examples
Default
Variants
For an alternative visual appearance and layout, without altering semantic meaning.
Logo
A logo (or similar) visual can be provided as an alternative to avatars.
Size
Use size
to alternate the text size. Available options are small
(default) and large
.
Layout
Testimonial
will expand to fill the width of its parent by default.
Use Stack
to help position multiple, adjacent Testimonials alongside one another.
Position
Pass additional content about the testimonial provider using position
.
Component props
Testimonial Required
Testimonial
passes contextual data to its child inputs, labels, validation messaging and more.
Name | Type | Default | Description |
---|---|---|---|
children | 'Testimonial.Quote' 'Testimonial.Name' 'Testimonial.Logo' 'Testimonial.Avatar' 'React.ReactNode' | Valid child nodes | |
className | string | Sets a custom class | |
id | string | Sets a custom id | |
ref | React.RefObject | Forward 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' 'blue-purple' 'green-blue' 'pink-blue' 'purple-red' 'red-orange' | 'default' | Color or gradient fill of the the quote mark. |
variant | 'subtle' 'default' 'minimal' | 'minimal' | Alternative visual appearance |
Testimonial.Name Required
Testimonial.Name
indicates the name of the person (or organisation) that provided the testimonial.
Name | Type | Default | Description |
---|---|---|---|
children | string | Label text | |
className | string | Applies a custom class | |
id | string | Sets a custom id | |
ref | React.RefObject | Forward a Ref to the underlying DOM node | |
position | string | Optional. Applies additional content adjancent to the primary text. |
Testimonial.Avatar
Testimonial.Avatar
represent users or organizations.
Name | Type | Default | Description |
---|---|---|---|
children | string | Label text | |
className | string | Applies a custom class | |
id | string | Sets a custom id | |
ref | React.RefObject | Forward a Ref to the underlying DOM node | |
src | string | Required. A url to the user or organisations GitHub profile avatar | |
alt | string | Required. Applied as alt text to the avatar. |
Testimonial.Logo
Testimonial.Logo
passes a visual that represents the users or organizations.
Name | Type | Default | Description |
---|---|---|---|
children | 'SVGElement' 'HTMLImageElement' | Accepts <img> and <svg> HTML elements as children. | |
className | string | Applies a custom class | |
id | string | Sets a custom id | |
ref | React.RefObject | Forward a Ref to the underlying DOM node |