Min/Max Range Filter

Price

to
About this component

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.

Usage

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

import { FilterRange } from "@/components/beste/component/filter-range";

<FilterRange
  label="Price"
  min={0}
  max={500}
  defaultValue={["25", ""]}   // 25 and up
  onChange={([min, max]) => console.log("range:", min, max)}
/>

Props

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

PropTypeDefaultDescription
labelstring—Optional group heading rendered above the inputs
minnumber—Placeholder for the minimum input
maxnumber—Placeholder for the maximum input
value[string, string]—Controlled raw input values as [min, max] strings; either side may be empty for an open-ended range. Omit to let the component manage state.
defaultValue[string, string]—Initial values when uncontrolled
onChange(value: [string, string]) => void—
classNamestring—

More Filter components

View all Filter

Price

$25$180

Fit

32
14
21

Rating