---
title: Testimonial
---

import LibraryInfo from '@theme/LibraryInfo'
import { Feedback, TokensTable, PropsTable } from '../../src/components'
import { Testimonial } from '@telus-uds/components-web'
import { Testimonial as WebDocs } from 'docs/@telus-uds/components-web'
import AvailableOnWebOnly from '../../partials/_platform-considerations-web-only.mdx'
import NoStylisticVariants from '../../partials/_variants-none.mdx'

# Testimonial

<LibraryInfo
  packageType="Web Component"
  figmaLink="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2F4zJn2Qn6uXOqPP1GVDipy6%2F%25F0%259F%258D%2580-Allium-Components%3Fnode-id%3D3398%253A33686"
/>

```jsx live
<Testimonial
  testimonial="Nulla sit amet congue lorem. Interdum et malesuada fames ac ante ipsum primis fame."
  showDivider
  title="John Doe"
  image={testImage}
  additionalInfo="Pinnacle Reforestation"
/>
```

## Introduction

For displaying a testimonial in a standalone, pre-styled component.

[Follow the appropriate instructions](importing-components) to add this component in to your app.

## Guidance

- Choose your preferred text style
  - Large text for really long content
  - Heading for short content
- Display optional elements
  - image via `image`
  - title
  - additionalInfo
- Display dividers based on context (`showDivider` prop)
  - Show borders when used in editorials and long-form content such as articles or full-page content
  - Hide borders when used inside Card components

### Using custom image content

Note that you can use custom image components by passing arbitrary JSX (e.g. NextJS `Image`) in the item `image` property instead of a string URL:

```jsx live
<Testimonial
  testimonial="Nulla sit amet congue lorem. Interdum et malesuada fames ac ante ipsum primis fame."
  showDivider
  title="John Doe"
  image={
    <OptimizeImage
      contentfulAssetUrl="/universal-design-system/img/pigs-allium-lo.png"
      alt="guinea pig"
      xs={120}
      sm={120}
      md={120}
      lg={120}
      xl={120}
    />
  }
  additionalInfo="Pinnacle Reforestation"
/>
```

### Accessibility

Testmionials are marked up on web as blockquotes.

### Platform considerations

<AvailableOnWebOnly />

## Props

<PropsTable web={WebDocs} />

## Tokens

<TokensTable web={WebDocs} component="Testimonial" />

## Variants

<NoStylisticVariants />

## Feedback

<Feedback component="Testimonial" />
