Backpack slider component.
Check the main Readme for a complete installation guide.
import { Component } from 'react';
import BpkSlider from '@skyscanner/backpack-web/bpk-component-slider';
const Slider = () => (
<BpkSlider
min={0}
max={100}
value={[20, 80]}
step={10}
className={'my-class-name'}
onChange={(value) => alert('Actual value: ' + value)}
/>
);
Please refer to react-slider's documentation for a full list of props.
Note: When you're representing non-integer values (eg time, dates) please ensure you use
ariaLabel
andariaValuetext
to ensure that assistive technologies will be able to understand the value better.
Property | PropType | Required | Default Value |
---|---|---|---|
className | string | false | null |
large | bool | false | false |
sliderBarColor