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.
Your invoice failed because the card on file expired at the end of September. Add a new card under Billing, then choose Retry payment on the invoice. The charge goes through straight away, and your plan stays active the whole time.
When to use
- AI answers, articles and help content people may want to listen to.
- Accessibility and language-learning features.
When not to use
- Long documents; use a full audio player with chapters.
- Pages that already autoplay sound.
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.
API reference
ReadAloud
3 props
Also accepts the native props of its root element and a ref.
Keyboard
- Home
- Jumps to the first item or the minimum.
- End
- Jumps to the last item or the maximum.
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
- State changes animate with the library's shared durations and curves, so its timing matches every other part.
- Under reduced motion each change lands on its end state without movement; nothing is hidden or skipped.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/read-aloud.mdThe index of every part is at /llms.txt.