Documentation
Feedback
Guides
Storefront Development

Storefront Development
Storefront development
PriceRange

Sliders that allows users to select a maximum and minimum price.

The PriceRange component is a Slider that allows users to select a maximum and minimum price from a range.
Example
Code
$0$500
$100$250

Usage

Import the component


_10
import { PriceRange } from '@faststore/ui'

Import styles

To apply styles, include the following in your stylesheet:

_10
@import '@faststore/ui/src/components/organisms/PriceRange/styles.scss';


Data attributes

You can target and override PriceRange styles using the following data attributes:
data-fs-price-range
data-fs-price-range-inputs

Props

NameTypeDescriptionDefault
variant"selling" | "listing" | "spot" | "savings" | "installment"The current use case variant for prices.
formatter*PriceFormatterFormatter function that transforms the raw price value and render the result.
aria-labelstringDefines a string value that labels the current element.
onChange(value: { min: number; max: number; }) => voidCallback that fires when the slider value changes.
testIdstringID to find this component in testing tools (e.g.: cypress, testing library, and jest).fs-price-range
min*RangeThe minimum value of the slider.
max*RangeThe maximum value of the slider.
stepnumberSpecifies the number interval to be used in the inputs.1
onEnd(value: { min: number; max: number; }) => voidCallback that fires when the slider value ends changing.
getAriaValueText(value: number, thumb?: "min" | "max") => stringA function used to set a human-readable value text based on the slider's current value.
minValueLabelComponent(minValue: number) => ReactNodeComponent that renders min value label above the left thumb.
maxValueLabelComponent(maxValue: number) => ReactNodeComponent that renders max value label above the right thumb.
Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
On this page