A call and recording overlay for AI voice apps, built on Live Activity. A pill with the clock, mute and end opens into a card with who is speaking, hold, record and a confirmed end. Controlled: you pass the state and handle the events, and the component never opens a microphone. The Pro layer adds a live level meter, a transcript line and a device menu.
On this page
- Voice agent call
- Recording in progress
- Support line
- Voice assistant
- Meeting capture
Examples
Recording
Live levels, transcript and devicesPro
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Installation
npx knowns-ui@latest add call-overlayPaste this into your coding agent (Claude Code, Cursor, Codex). It checks your project, sets up the registry, runs the install and verifies it.
Install Call overlay from Knowns UI into this project. Work step by step, show me each change, and ask before you edit files outside this project.
Context: Knowns UI (https://ui.knowns.dev) is a shadcn registry. Items land in the project as source files. Docs: https://ui.knowns.dev/docs/call-overlay
1. Check the project first. Stop and tell me if any of these is missing:
- React 19 and Tailwind CSS v4.
- A components.json at the project root. If there is none, ask me before running `npx knowns-ui@latest init --no-key` (it runs shadcn init when needed, then adds the registries).
2. Run:
```bash
npx knowns-ui@latest add call-overlay
```
It writes these files:
- lib/knowns/run.ts
- lib/knowns/json.tsx
- lib/knowns/status.ts
- lib/knowns/tone.ts
- lib/knowns/types.ts
- lib/knowns/use-abortable.ts
- lib/knowns/utils.ts
- components/ui/knowns/spinner.tsx
- components/ui/knowns/button.tsx
- lib/knowns/motion.tsx
- lib/knowns/motion-utils.ts
- components/ui/knowns/status-dot.tsx
- components/ui/knowns/live-activity/live-activity.tsx
- components/ui/knowns/live-activity/activity-utils.ts
- components/ui/knowns/use-floating.ts
- components/ui/knowns/tooltip.tsx
- components/ui/knowns/tooltip-utils.ts
- components/ui/knowns/call-overlay/call-overlay.tsx
- components/ui/knowns/call-overlay/call-state.ts
and installs these npm packages: clsx@^2.1.1, tailwind-merge@^3.7.0, class-variance-authority@^0.7.1.
3. While it runs:
- It also adds a few @keyframes (all named kn-*) to the global CSS file (globals.css or the file components.json points at). Let it: they only add animations.
- If it asks to overwrite files under lib/knowns/: these are shared by every Knowns UI item. List them, say whether I changed them (check git), and ask me before you answer.
- If it asks to overwrite any other file, show me the diff and ask me.
4. Verify:
- Every file in the list above exists.
- The project type-checks (for example `npx tsc --noEmit`) and the dev build has no new errors.
5. Use it: follow the examples and props on https://ui.knowns.dev/docs/call-overlay, and ask me if anything about my data is unclear.
If the Knowns UI MCP server is connected (https://ui.knowns.dev/docs/ai-and-mcp), use get_component({ name: "call-overlay" }) or search_docs for details.
Finish with a short summary: the files you added or changed, the packages you installed, and anything I still need to do.Props
- name / avatar
string / ReactNode- The other side of the call. Without an avatar, initials.
- status
"connecting"|"live"|"hold"|"ended"- Drives the dot and the word. Muted and recording are flags, not states.
- muted / onMutedChange
boolean / (muted) => void- Default
false - Your microphone is off. The overlay shows it and reports the press; you turn the microphone off.
- onHoldChange
(hold: boolean) => void- Hold was pressed (true) or Resume was pressed (false). You set status.
- recording / onRecordingChange
boolean / (rec) => void- Default
false - A red dot in the pill and the word Recording. You start and stop the recorder.
- elapsedMs
number- The clock, in milliseconds. You own it: useCallTimer is one way.
- speaker
"agent"|"you"|null- Default
null - Who is speaking, for the line in the card.
- onEnd / confirmEnd
() => void / boolean- Default
true - End asks first, inline in the card (never a native dialog), then calls onEnd.
- expanded / defaultExpanded / onExpandedChange
boolean- Default
false - The card is open. The row is a button with aria-expanded.
- meter / transcript / devices
ReactNode- Slots the Pro layer fills: a level meter, a line of speech and a device menu.
- tone
"auto"|"inverse"|"surface"- Default
"surface" - surface is the page's own card lifted with a hairline. inverse is a dark pill in light mode and a light one in dark mode; its destructive button reads best on a dark page.
- RecordingOverlay
paused, onPausedChange, onStop, onDiscard, elapsedMs, title?- A red dot, the clock, pause or resume and stop. Discard asks first.
- LiveCallOverlay (Pro)
stream?, agentLevel?, transcript?, microphones?, speakers?- CallOverlay plus a meter that follows stream or agentLevel, a transcript line and a device menu.
- useMicLevel (Pro)
(stream, { everyMs, history, active }) => { level, levels }- An AnalyserNode reading, 0 to 1. You open the microphone; the hook never asks for permission or stops your tracks.
| Prop | Type | Default | Description |
|---|---|---|---|
| name / avatar | string / ReactNode | - | The other side of the call. Without an avatar, initials. |
| status | "connecting" | "live" | "hold" | "ended" | - | Drives the dot and the word. Muted and recording are flags, not states. |
| muted / onMutedChange | boolean / (muted) => void | false | Your microphone is off. The overlay shows it and reports the press; you turn the microphone off. |
| onHoldChange | (hold: boolean) => void | - | Hold was pressed (true) or Resume was pressed (false). You set status. |
| recording / onRecordingChange | boolean / (rec) => void | false | A red dot in the pill and the word Recording. You start and stop the recorder. |
| elapsedMs | number | - | The clock, in milliseconds. You own it: useCallTimer is one way. |
| speaker | "agent" | "you" | null | null | Who is speaking, for the line in the card. |
| onEnd / confirmEnd | () => void / boolean | true | End asks first, inline in the card (never a native dialog), then calls onEnd. |
| expanded / defaultExpanded / onExpandedChange | boolean | false | The card is open. The row is a button with aria-expanded. |
| meter / transcript / devices | ReactNode | - | Slots the Pro layer fills: a level meter, a line of speech and a device menu. |
| tone | "auto" | "inverse" | "surface" | "surface" | surface is the page's own card lifted with a hairline. inverse is a dark pill in light mode and a light one in dark mode; its destructive button reads best on a dark page. |
| RecordingOverlay | paused, onPausedChange, onStop, onDiscard, elapsedMs, title? | - | A red dot, the clock, pause or resume and stop. Discard asks first. |
| LiveCallOverlay (Pro) | stream?, agentLevel?, transcript?, microphones?, speakers? | - | CallOverlay plus a meter that follows stream or agentLevel, a transcript line and a device menu. |
| useMicLevel (Pro) | (stream, { everyMs, history, active }) => { level, levels } | - | An AnalyserNode reading, 0 to 1. You open the microphone; the hook never asks for permission or stops your tracks. |
What it handles
- 01Shows a call as a pill: a status dot, the word for the call, the clock, mute and end, one row tall.
- 02Opens into a card with who is speaking, hold, record and an inline step that asks before it ends the call.
- 03Treats muted and recording as flags on a live call, so the word reads Live, Muted or Recording without a state for every pair.
- 04Speaks to a screen reader once when the state changes, with the time so far, and never on a tick of the clock.
- 05Records in a separate pill with a red dot, pause or resume, stop, and a Discard that asks first.
- 06Follows a microphone with a level meter from a MediaStream you open, with a transcript line and a device menu (Pro).
States
- First render
- Nothing. The pill paints as it is, open or shut
- none
- Open or close
- The card folds open under the row; closing is faster
- 180ms, ease out (120ms to close)
- State word changes
- Connecting, Live, Muted, On hold or Ended swaps in place
- 180ms, ease out
- Press a control
- Filled and outlined buttons press in to 0.97
- 120ms, ease out
- Mute, hold or record
- The button fills to show it is on; the dot and the word follow
- 120ms, ease out
- Each second
- The clock text changes, nothing moves
- none
- Level meter (Pro)
- Bars rise and fall with the voice, a little at a time
- 120ms, ease out
- Reduced motion
- Every change lands at once; the meter becomes bars that light up
- 0ms
| State | What moves | Timing |
|---|---|---|
| First render | Nothing. The pill paints as it is, open or shut | none |
| Open or close | The card folds open under the row; closing is faster | 180ms, ease out (120ms to close) |
| State word changes | Connecting, Live, Muted, On hold or Ended swaps in place | 180ms, ease out |
| Press a control | Filled and outlined buttons press in to 0.97 | 120ms, ease out |
| Mute, hold or record | The button fills to show it is on; the dot and the word follow | 120ms, ease out |
| Each second | The clock text changes, nothing moves | none |
| Level meter (Pro) | Bars rise and fall with the voice, a little at a time | 120ms, ease out |
| Reduced motion | Every change lands at once; the meter becomes bars that light up | 0ms |
Works with
When to use
When to use
- A voice agent call in the corner of your app: who you are talking to, how long, mute and end, always within reach.
- A recording in progress with pause, stop and discard, in a pill that does not cover the page.
When not to use
- A waveform and tokens per second for an agent on a call: use Agent Activities.
- Many things running at once: use Activity Stack.
- A bare capsule for your own content: use Live Activity.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Call Overlay to my app and wire it to my own data.
- I need a voice agent call in the corner of your app: who you are talking to, how long, mute and end, always within reach. Set that up with the Knowns UI Call Overlay.
- Which Call Overlay props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "call-overlay" }) and search_docs({ query: "call overlay" }).