Variants and sizes

  • Default (k-slider): one size; the input is 48px tall across its full width.

States

  • Rest: fill and thumb at the value, the value in text above.
  • Hover: the pointer turns into a hand.
  • Dragging: the value text changes with every step.
  • Focus: a 2px focus-ring ring 2px outside the slider's 48px row.
  • Disabled: avoid it; when a value is fixed, show it as text with the reason.

Do and don’t

Do

  • Show the value with its unit, in mono: "25 min".

  • Use steps people think in, like 5 min.

  • Update --k-fill, the value text and aria-valuetext on every input event.

Don’t

  • Hide the value until the person drags.

  • Use a slider for money or any number that must be exact.

What you provide

  • Label, min, max, step and the value.
  • The unit, for the value text and aria-valuetext.
  • What happens on change.