Pro
Read aloud
A Read aloud button for a reply that grows into a compact player: play and pause, a bar to drag or step through word by word, speed and close. A highlight glides from word to word as it is read.
pnpm dlx shadcn@latest add @caliper/read-aloudWhen to use
Use it for
- AI answers, articles and help content people may want to listen to.
- Accessibility and language-learning features.
Skip it when
- Long documents; use a full audio player with chapters.
- Pages that already autoplay sound.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Voice when there is one
- It speaks with the browser's voice and follows its word boundaries; with no voice, the same highlight keeps time silently.
- Grows from its button
- The player opens out of the button's width and folds back on close, so it never jumps the row.
Usage
- A word slider
- The bar is a slider over the words: arrows move one word, Page keys ten, and its value is read as "Word 12 of 80".
Installation
pnpm dlx shadcn@latest add @caliper/read-aloud
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source.
import { ReadAloud } from "@/components/ui/read-aloud"
The worked example comes with Pro
The 25-line example behind the preview opens here, ready to copy.
- 602 Pro parts, blocks and page templates, all with source
- $199 once, with a year of updates. What you have stays yours
- A full refund within 14 days if it is not for you
API reference
ReadAloud
component
Also accepts the native props of its root element and a ref.
Accessibility
It exposes group and slider semantics, with aria-hidden, aria-label, aria-valuemin, aria-valuemax, aria-valuenow and aria-valuetext kept in step with state.
Motion
It checks prefers-reduced-motion itself and settles immediately instead of travelling. Every state is still reachable.
Related
- Waveform playerA recording you can see. The waveform is the seek bar, the played part fills in as it plays, and the pointer shows the time under it before you press. Speed steps through 1×, 1.5× and 2×.
- Media playerAn audio or video player with accessible controls and a progress bar.
- MessageOne chat message with a role, optional name, status and actions.