Range Slider Filter

Price

$25$180
About this component

Range Slider Filter

Two-thumb range slider with live numeric readouts and a commit callback, built for price ranges.

Usage

The import and the props worth knowing about, in one place.

import { FilterSlider } from "@/components/beste/component/filter-slider";

<FilterSlider
  label="Price"
  min={0}
  max={300}
  step={5}
  unit="$"
  defaultValue={[25, 180]}
  onChange={(value) => console.log("dragging:", value)}
  onCommit={(value) => console.log("committed:", value)} // fetch here
/>

Playground

Turn the props on the right; the snippet under them is what you would write to get what you see.

Price

$25$180
Usage
import { FilterSlider } from "@/components/beste/component/filter-slider";

<FilterSlider
  label="Price"
  className="w-64"
  unit="$"
  defaultValue={[25,180]}
/>

Keyboard and gestures

Every one of these is in the component already. They are listed because a props table cannot mention a gesture, so nothing else on this page can tell you they exist.

TabMove between the two thumbs.
Arrow keysOne step on the focused thumb.
Home / EndSend the focused thumb to its end of the range.

Props

Read from the component's own type, so this cannot drift from what it accepts.

PropTypeDefaultDescription
labelstringOptional group heading rendered above the slider
minnumber
maxnumber
stepnumber
unitstringPrefix shown before the numeric readouts, e.g. "$"
value[number, number]Controlled range; omit to let the component manage its own state
defaultValue[number, number]Initial range when uncontrolled
onChange(value: [number, number]) => voidFires on every thumb move
onCommit(value: [number, number]) => voidFires when the user releases a thumb; use it to trigger fetches
classNamestring

More Filter components

View all Filter

Price

to

Min/Max Range Filter

Paired number inputs for open-ended ranges: either side can stay empty, so users can filter by only a minimum or only a maximum.

Brand

Combobox Filter

Searchable dropdown for very long option lists like brands. Type to narrow options, select one or many, and see result counts inline.

Category

24
18
9
12

Checkbox Filter

Multi-select checkbox list with optional result counts. Works controlled or uncontrolled, designed for filter sidebars and toolbars.

Size

Multiselect Filter

Dropdown with checkbox rows and a selection-count badge. Keeps many-option filters compact in toolbars where a checkbox list would not fit.

Category

Select Filter

Single-select dropdown for long option lists that would crowd a sidebar. Supports a clear item, result counts, and a disabled state for dependent filters.

Gender

Segmented Filter

Single-select segmented control built on Tabs for mutually exclusive choices like gender or condition. Clicking the active segment clears the selection.