Scrubber

A design-tool style scrubber slider with animated thumb, label, value display, and tick marks.

Open in v0~9.0 kB

Last updated: March 7, 2026

Opacity
0.40
Scale
1.5
Rotation
45

Installation

npx smoothui-cli add scrubber

Features

  • Dark, self-contained slider with built-in label and value display
  • Animated thumb that appears on hover and drag with spring physics
  • Subtle scrub indicator for position feedback at rest
  • Configurable tick marks for visual reference
  • Keyboard accessible (arrow keys, Home, End)
  • Supports controlled and uncontrolled usage
  • Respects prefers-reduced-motion

Accessibility

Keyboard Interactions

KeyDescription
ArrowRight / ArrowUpIncreases the value by one step
ArrowLeft / ArrowDownDecreases the value by one step
HomeSets the value to the minimum
EndSets the value to the maximum

ARIA Attributes

AttributeElementPurpose
role="slider"Track elementIdentifies the component as a slider
aria-labelTrack elementProvides an accessible name (uses the label prop)
aria-valueminTrack elementCommunicates the minimum value
aria-valuemaxTrack elementCommunicates the maximum value
aria-valuenowTrack elementCommunicates the current value
tabIndex={0}Track elementMakes the slider focusable

Reduced Motion

This component respects the prefers-reduced-motion media query via useReducedMotion from Motion. When reduced motion is preferred, the thumb capsule animation uses instant transitions instead of spring physics.

Props