Skip to content

Waveform

Stable

The loudness of a clip drawn as bars, with the played part filled. Can also be the seek control.

Also known as audio waveform, sound wave, visualizer

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Seek control with markers

At 0:52 of 3:12. One marker needs review.

A call recording. Drag, tap or use the arrow keys to seek. Markers show a tool call, an interruption and, as an amber diamond, a transfer someone should review.

When to use it

Shows the shape of a clip so people can see where the talking, the quiet parts and the marked moments are, and jump straight to them.

Made of: Bars · Played part · Playhead · Regions · Markers · Still-being-made track · Region key with times · Time bubble while dragging

Use it for

  • The seek bar of a call recording, a voice clip or a song.
  • Showing which stretch of a song or voice-over the AI made or changed.
  • A small level display beside a microphone, with its state written next to it.

Not for

  • A full player with play, time and speed: use AudioPlayer.
  • Picking a value on a scale: use Slider.
  • A trend in numbers over time: use Sparkline.

Do and avoid

Do. Only the transfer is marked for review. The rest stay quiet.
Avoid. Every moment marked for review hides the one that needs a person.

Do

  • Precompute the peaks on the server, 100 to 200 values for a clip, so the page does not decode the audio.
  • Pass the real media time as position, and let the playhead move with it.
  • Label every region and marker in plain words.
  • Use the ai region only for stretches the AI made or changed.

Avoid

  • Don't colour the bars, the playhead or the played part with the AI colour. Playback is not AI.
  • Don't use amber for anything but a stretch or moment a person must act on.
  • Don't animate the bars to the beat as the main sign of state. Write the state in words.
  • Don't make the live drawing the only sign that the microphone is on.

On a phone

  • It fills the width. As a seek control its hit area is at least 44px tall, even at the 32px height.
  • Tap anywhere to seek. While a finger drags, a time bubble shows above it.
  • A touch that starts on it does not scroll the page, so dragging stays put.
  • When the waveform is narrower than 256px (a 320px phone inside a card) the bars give way to a plain progress bar.

Seen in products

  • Vapi call logs put a waveform you can play and scrub at the top of each call.
  • ElevenLabs Studio describes its waveforms as showing relative loudness.
  • Suno's Song Editor works directly from the waveform: select a stretch, then Replace or Extend.
  • Descript makes the selected text pulse while it regenerates that part.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started