Kinetic Slider

A range slider with a live value badge and a thumb that knocks as you drag.

  • <kt-kinetic-slider>
  • Inputs
  • No framework

Kinetic Slider

The code

Copy the Kinetic Slider

Fastest: press Copy on the card above for one complete file. To build it into your own project, use the files below: the markup, the styles, this component’s script and the shared effects script (effects.js) that every component uses.

<kt-kinetic-slider label="Output Volume" min="0" max="100" value="64" suffix="%" sfx="シュッ!"></kt-kinetic-slider>

<kt-kinetic-slider label="Motion Blur" min="0" max="10" value="3" step="1" sfx="カチッ!"></kt-kinetic-slider>

Attributes

NameWhat it doesDefault
labelHeading above the track.—
minLowest value.0
maxHighest value.100
valueCurrent value.—
stepStep size.1
suffixUnit shown after the value, such as %.—
sfxSound-effect text on change.—

Keyboard and screen readers

  • Built on a native range input: arrow keys, Home and End work.
  • The value badge is announced as it changes.

Styling variables

Every look is a CSS variable: --kt-accent, --kt-accent-ink, --kt-radius-btn, --kt-surface-radius, --kt-surface-bg, --kt-border-w, --kt-comp-shadow and --font-sans. The copied file sets them all from your choices.

FAQ

Kinetic Slider: questions answered

How do I use the Kinetic Slider?

Press Copy on the card to get a complete HTML file, or copy the HTML, CSS and JavaScript tabs into your own page. In your markup the element is written as <kt-kinetic-slider>.

Which attributes does <kt-kinetic-slider> accept?

label, min, max, value, step, suffix, sfx. Each one is described in the attributes table on this page.

Is the Kinetic Slider accessible?

Built on a native range input: arrow keys, Home and End work. The value badge is announced as it changes.

Can I change the Kinetic Slider colors, corners and font?

Yes. Use the options on this page: accent color, border radius, background, border, shadow and Google font. The copied code already contains your choices, and every one of them is a CSS variable you can edit later.