Call Transcript
ProNewA call as it was said: caller and agent on opposite sides, events such as transfers between them, words still being recognized shown lighter, and the wait before each agent reply.
Installation
pnpm dlx shadcn@latest add @viewport/call-transcript
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| turns* | TranscriptTurn[] | — |
| agentName | stringThe names shown for the two sides. | "Agent" |
| callerName | string | "Caller" |
| live | booleanThe call is in progress: new turns scroll into view and the last one is announced. | false |
| currentTime | numberThe playback position in seconds. The turn being spoken is marked. | — |
| onSeek | (seconds: number) => voidMakes each turn a button that seeks to its start. | — |
| slowAfterMs | numberA reply slower than this is flagged, in milliseconds. | 1200 |
| className | string | — |
Accessibility
- A log region: new turns are announced politely during a live call.
- Following the live edge stops when you scroll up, and a button returns to it.
- Slow replies are flagged in words as well as color.
- With seeking on, each turn is a button and the one playing is marked current.