SeekSlider
moleculesMedia scrubber that previews while dragging and commits once on release, with buffered ranges, a hover time tip and a live mode.
Now playing
bind:value moves only on commit; oninput previews the target while dragging and onchange is where the player seeks.
Static Bloom Kaleido · Neon Rain
Sizes, buffering and preview tip
size="sm" | "md"; buffered draws [start, end] ranges; previewSnippet renders above the hover time; formatTime swaps the clock.
size="sm", a single buffered range size="md", gaps in the buffer after seeking ahead previewSnippet: hover the podcast to see the chapter formatTime: whole minutes for an audiobook
States
disabled; max={null} (live) and max={0} (not loaded) make the track inert; value is clamped to the duration.
disabled while an ad plays metadata not loaded yet at the end, and a value past the duration clamps ten-hour stream recording
LIVE a live stream has no duration
Keyboard and events
step seconds per arrow, bigStep of the duration per PageUp/PageDown, Home/End; every key press is one onchange.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value bindable | number | 0 | Position in seconds. Updated only on commit, never while dragging. |
max | number | null | null | Duration in seconds. `null`/`Infinity`/`0` = live or unknown: the track is disabled. |
buffered | [number, number][] | [] | Buffered `[start, end]` ranges in seconds, drawn as a muted fill. |
step | number | 5 | Seconds per arrow key. |
bigStep | number | 0.1 | Fraction of the duration per PageUp/PageDown. |
disabled | boolean | false | |
size | 'sm' | 'md' | 'md' | |
label | string | 'Seek' | |
sound | boolean | true | Play UI sounds when enabled globally; false silences this instance. |
formatTime | (seconds: number, ref?: number) => string | formatMediaTime | |
oninput | (seconds: number) => void | — | Fired on every pointer move while scrubbing with the previewed time. |
onchange | (seconds: number) => void | — | Fired once on release or per keyboard step with the committed time. |
onscrubstart | () => void | — | |
onscrubend | () => void | — | |
previewSnippet | Snippet<[number]> | — | Rendered above the time in the hover/drag tooltip (thumbnail). |
class | string | '' | |
style | string | — |