Skip to content

Timeline Scrubber

Pro

Shows activity over a day as bars with a playhead. Drag back in time, replay the day, pause, and go back to live.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 10, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Timeline Scrubber needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
33
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

Pass the span and one count for each bucket. Put the axis in the track and the playback buttons in the controls.

visitors-today.tsx

TimelineScrubber

<fieldset>
PropTypeDefaultDescription
aria-labelstring—Defines a string value that labels the current element. The accessible name of the group and the playhead. Default "Time".
startRequirednumber—The start of the span (ms since 1970).
endRequirednumber—The end of the span (ms). The future after now is a dashed line.
nownumber—Now (ms), from the app clock. Leave it out and the part reads Date.now once a second.
countsRequiredreadonly number[]—One count per bucket, evenly from start to end; buckets after now are not drawn.
defaultMode"live""paused""live"paused starts on defaultValue; live (default) starts on now.
defaultValuenumber—The first head time with defaultMode="paused".
replayDurationnumber12_000How long a replay from start to now takes, in ms. Default 12,000.
stepnumber—The arrow key step in ms. Default: one bucket.
largeStepnumber60 * 60 * 1000The Page key step in ms. Default: one hour.
timeZonestring—The IANA time zone of the clock and the axis. Default: the browser zone.
localeLocalesArgument—
size"default""lg""sm""default"The bar area height: sm 32, default 48, lg 64px.
disabledbooleanfalse
labels—The words of the Play button (TIMELINE_SCRUBBER_LABELS), to translate them. Keep the object stable.
onModeChange—
onValueChange—The head time, on each change (a drag, a key, each replay frame, each live second).
...props<fieldset> attributes—Every other attribute goes to the <fieldset>, with a ref.

TimelineScrubberControls

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TimelineScrubberReplay

<button>
PropTypeDefaultDescription
childrenReactNode"Replay"The label. Default "Replay". It hides under 384px and stays the name.
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
glass"clear""dark""light"—
rounded"default""full"—
size"default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs"—
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary"—
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

TimelineScrubberPlay

<button>
PropTypeDefaultDescription
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
glass"clear""dark""light"—
rounded"default""full"—
size"default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs"—
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary"—
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

TimelineScrubberLive

<button>
PropTypeDefaultDescription
childrenReactNode"Go live"The label while not live. Default "Go live".
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
glass"clear""dark""light"—
rounded"default""full"—
size"default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs"—
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary"—
liveLabelReactNode"Live"The label while live. Default "Live".
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

TimelineScrubberClock

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

TimelineScrubberTrack

<div>
PropTypeDefaultDescription
childrenReactNode—What goes under the bars. Default: a TimelineScrubberAxis. Pass null for none.
labelstring—The accessible name of the playhead. Default: the root aria-label.
getValueTexttimelineValueTextThe value text of the playhead from the time ("09:07 UTC") and the count of its bar. Default: "09:07 UTC, 214 in this bar". Name what is counted: "09:07 UTC, 214 visitors".
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TimelineScrubberAxis

<div>
PropTypeDefaultDescription
ticksnumber5How many ticks, start and end included. Default 5 (every 6 hours of a day).
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use it for activity that grows in real time: traffic, events, requests.
  • Use onValueChange to show what happened at the head, such as a count or an event.
  • Use defaultMode="paused" with defaultValue to open on a time in the past.
  • To pick a value or a range with no time, use a Slider.
  • To scrub frames of a video or an image sequence, use a Scrub Slider.
Arrow keysMoves the head by one bucket, or by step.
Page UporPage DownMoves the head by largeStep (one hour by default).
HomeorEndMoves the head to the start or to now.
SpacePlays or pauses, while the head has focus.

The head is a native range input with a name from aria-label; its value text says the time and the count of its bar.

The Replay button keeps its name when its label hides on a narrow track.

The Play button says what a press does: Play or Pause. Translate it with labels.

Go live
indicator · the head glides to now
Live dot
statusPop · the dot pops once when the part goes live
Time tag
fade · the time over the head fades in while you scrub or point at it
New data
panel · each bar grows from its old height

Built with

Installs with Timeline Scrubber

Components
Button,Slider
  1. AddedTimeline Scrubber, with Button, Slider.
Open the release