AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Entry

Slider

Drag to set a value across a known range — volume, opacity, thresholds, ranges — rendered through the shared Slider.

Examples

API

PropTypeDefaultNotes
valuenumber | [number, number]Position(s); a pair renders a range slider
minnumber0Range floor
maxnumber100Range ceiling
stepnumber | null1Increment; null with marks to snap to marks only
marks{ [value]: label }Labelled tick positions
rangebooleanfalseTwo thumbs — select a [low, high] span
verticalbooleanfalseOrient the rail vertically
disabledbooleanfalseNon-interactive, dimmed track + handle
onChange(value) => voidFires with the new value(s)

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/slider-theme';   // registers <slider>

Agent feed for this component (absolute, fetchable anywhere): slider.agent.json · slider.md · slider.llms.txt

When to use

When to use
  • Slider — an approximate value across a continuous range where feel beats an exact number
  • InputNumber — the exact number matters — a precise limit or count
  • Slider range — a span with a low and high bound — a price or time window
Pair a slider with a live value readout (or an InputNumber) when the exact number matters. Use marks and step to snap to meaningful positions rather than an arbitrary continuum.
Surfaces
editor dashboard settings

Spec

Rail 4px · #F1F1F1 (gray-30) · Track brand #6A1EBB · Handle 14px · brand ring · Hover rail #E3E3E3 (gray-40) · Range two thumbs when value is a [min,max] pair