Skip to content

FrameScrubber

Stable

The seek slider for a video clip: time in words, frame steps and a preview while dragging.

Also known as scrubber, timeline scrubber, seek bar

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

Frame-accurate, with a drawn preview

0:03 of 0:08, frame 79 of 192

With fps the scrubber snaps to whole frames. Focus it, then use the arrows for 1 second and comma or period for one frame. Point or drag to see the frame preview.

When to use it

Lets people find an exact moment in a short clip, down to the frame, by pointer or keyboard.

Made of: Hit area · Track · Played part · Thumb · Preview bubble with thumbnail, time and frame

Use it for

  • The seek bar inside a video player.
  • Picking a single frame, such as a start frame or a thumbnail.
  • Any short clip where tenths of a second matter.

Not for

  • Audio, where the loudness shape helps people find a moment: use Waveform.
  • Picking a start and an end: use ClipRangeSelector.
  • Picking a value on a scale: use Slider.

Do and avoid

Take 3, 8 seconds

Do. Frame steps on a short clip find the exact moment to use.

Call with Maya Okafor

Avoid. On a call recording, a plain bar hides where people talk.

Do

  • Pass fps for generated clips, so people can land on an exact frame.
  • Keep the played part in ink and the track neutral.
  • Pause playback while the person drags (onScrubbingChange).

Avoid

  • Don't colour the played part with the AI colour.
  • Don't shrink the 44px hit area to match a thin design.
  • Don't make comma and period work when the scrubber does not have focus. VideoPlayer adds them for the whole player, with an off switch.

On a phone

  • The track is 4px but the hit area is 44px tall and fills the width.
  • Tap anywhere to seek. While a finger drags, the bubble shows the time and frame above it.
  • A touch that starts on it does not scroll the page.

Seen in products

  • Google Flow: Shift with an arrow pauses and steps one frame.
  • The W3C seek slider example says the time in words, such as "4 minutes 3 seconds", not a raw number.

Build your next AI screen with Tattva.

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

Get started