127 Components

Stepper & Slider

Inputs

Synchronized precision control pairing a thin-track slider and large round thumb with a tactile (− / +) segmented stepper pill.

Display Brightness65%
Step: 5%

Installation

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

Requires:framer-motionlucide-reactclsxtailwind-merge
$npx shadcn@latest add "https://boseui.site/r/stepper-slider-control.json"

Props

TypeScript props supported by <StepperSliderControl />.

10 props
PropTypeDefaultDescription
labelstring"Display Brightness"Label displayed above the slider track.
valuenumber—Controlled numeric value.
defaultValuenumber65Initial value for uncontrolled mode.
minnumber0Minimum allowed value.
maxnumber100Maximum allowed value.
stepnumber5Step increment for both slider snapping and (− / +) buttons.
unitstring"%"Unit suffix displayed next to the numeric value.
onChange(value: number) => void—Callback fired when the value changes.
disabledbooleanfalseDisables both slider and stepper buttons.
classNamestring—Additional Tailwind CSS classes for the outer card.

Key Features

  • Thin 6px slider track paired with a prominent 24px circular thumb that scales on pointer drag.
  • Segmented (− | +) pill stepper for exact incremental adjustments.
  • Supports both controlled (`value`, `onChange`) and uncontrolled (`defaultValue`) modes.

Keyboard & Accessibility

  • Exposes WAI-ARIA `role='slider'` with `aria-valuemin`, `aria-valuemax`, and `aria-valuenow`.
  • Supports `ArrowLeft`, `ArrowRight`, `ArrowUp`, `ArrowDown`, `Home`, and `End` keys.
  • Stepper buttons include descriptive `aria-label` attributes and disabled boundary states.