Slider

Sliders allow users to input a numeric value from a given range.

Default

Storybook failed to load.

Stepped

Steps can be used for larger increments.

Storybook failed to load.

Range slider

Sliders can be used to specify a range of values with multiple "handles".

Storybook failed to load.

Range with minimum distance

You can set a minimum distance between the minimum and maximum range values.

Storybook failed to load.

Non-integer values

For non-integer values, it's necessary to use the ariaLabel and ariaValuetext props to provide assistive technology with meaningful values.

Storybook failed to load.

bpk-component-slider

Backpack slider component.

Installation

Check the main Readme for a complete installation guide.

Usage


                                                
                                                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)}
                                                  />
                                                );

Props

Check out the full list of props on Skyscanner's design system documentation website.

Props

Storybook failed to load.