127 Components

Kinetic Slider

Inputs

Elastic range slider featuring velocity-reactive tooltip inertia, logarithmic rubber-band boundary over-drag, and full keyboard accessibility.

Spring Tension64%
0%100%

Installation

Install directly into your project using the shadcn CLI or copy the source code manually.

Requires:framer-motionclsxtailwind-merge
$npx shadcn@latest add "https://boseui.site/r/kinetic-slider.json"

Props

TypeScript props supported by <KineticSlider />.

10 props
PropTypeDefaultDescription
labelstring"Spring Tension"Accessible label rendered above the slider rail.
defaultValuenumber64Initial numeric value for uncontrolled usage.
minnumber0Minimum allowed slider value.
maxnumber100Maximum allowed slider value.
stepnumber1Numeric increment step size.
unitstring"%"Unit suffix displayed next to the numeric value.
valuenumber—Controlled numeric value for the slider
stiffnessnumber—Spring tension for kinetic dragging physics
dampingnumber—Spring damping coefficient
onChange(val: number) => void—Callback fired when slider value changes

Key Features

  • Real-time drag velocity tracking via Framer Motion useVelocity to tilt the floating value badge.
  • Logarithmic rubber-band resistance when dragging past min or max boundaries.
  • Tactile thumb squash-and-stretch and dynamic rail thickening on pointer capture.

Keyboard & Accessibility

  • Implements full WAI-ARIA role='slider' with aria-valuemin, aria-valuemax, aria-valuenow, and aria-valuetext.
  • Supports ArrowLeft/Right/Up/Down, PageUp/PageDown (10x step), and Home/End keyboard increments.
  • Disables velocity rotation and rubber-band displacement when prefers-reduced-motion is enabled.