# VideoTestimonial

Video testimonial card with aspect frame, attribution and transcript slot

> Component ID: `video-testimonial`
> Import: `import { VideoTestimonial } from '@slipstream-ui/core'`
> Docs: https://slipstreamui.com/docs/components/video-testimonial
> Registry: https://slipstreamui.com/registry/video-testimonial.json
> Tier: organism · Package: @slipstream-ui/core@0.16.0
> Manifest schema: v1 · manifest: v1

## Design intent

VideoTestimonial pairs customer-proof video with the attribution and quote that make it persuasive. It renders native <video controls> (or a consumer embed) so playback is keyboard accessible and never autoplays, and reserves an explicit transcript slot because WCAG expects a text alternative for meaningful video.

## Props

| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| src | `string` | — | no | Video file URL (mp4/webm) rendered with native controls and preload=none |
| poster | `string` | — | no | Poster frame shown before playback; also renders as the frame image when src is absent |
| name | `string` | — | yes | Name of the person quoted — also labels the video region |
| role | `string` | — | no | Role or title, e.g. "Head of Product" |
| company | `string` | — | no | Company or organization name |
| avatarSrc | `string` | — | no | Avatar image URL rendered through Avatar's fallback chain |
| avatarFallback | `ReactNode` | — | no | Fallback content shown when avatarSrc is absent or fails (defaults to initials) |
| quote | `string` | — | no | Testimonial copy rendered as a blockquote under the attribution |
| transcript | `ReactNode` | — | no | Transcript link or inline text — provide one for WCAG caption coverage |
| children | `ReactNode` | — | no | Custom embed (iframe, etc.) rendered inside the aspect frame instead of src |
| className | `string` | — | no | Additional CSS classes to apply |

## Examples

### Hosted video testimonial

Native controls, poster frame and a transcript link

```tsx
<VideoTestimonial
  src="/talks/ada.mp4"
  poster="/talks/ada.jpg"
  name="Ada Lovelace"
  role="CTO"
  company="Acme"
  quote="It cut our review time in half."
  transcript={<a href="/talks/ada/transcript">Read transcript</a>}
/>
```

### Custom embed

Children replace the native video inside the same aspect frame

```tsx
<VideoTestimonial name="Grace Hopper" role="VP Engineering">
  <iframe title="Interview" src="https://player.example.com/v/123" allowFullScreen />
</VideoTestimonial>
```

## Anti-patterns

- **Don't autoplay or hide controls** — The component never sets autoplay and always renders controls. For custom embeds, keep equivalent user control — a muted autoplaying background loop is not a testimonial.
- **Don't skip the transcript** — Meaningful video needs a text alternative. Provide transcript as a link to a transcript page or inline text.

## Accessibility

- **Keyboard playback**: Native <video controls> is fully keyboard operable; custom embeds must provide equivalent controls
- **Captions and transcript**: The transcript slot renders consumer-provided text or a link; native <track> captions can be added inside a custom embed
- **Named region**: The aspect frame carries aria-label={name} so the video region has an accessible name

## Composition

- Compose with **Testimonial** — Use Testimonial for written quotes; VideoTestimonial adds the video frame
  
  ```tsx
  <VideoTestimonial ... /> vs <Testimonial quote="..." name="..." />
  ```
- Compose with **Avatar** — avatarSrc renders through Avatar internally; pass a composed Avatar via avatarFallback content when you need custom fallbacks
  
  ```tsx
  <VideoTestimonial avatarSrc="/ada.jpg" name="Ada" ... />
  ```
- Related: Testimonial, Media, Avatar, AudioEmbed

