11---
22title : Range Slider
3- package : " @chakra-ui/slider"
3+ package : ' @chakra-ui/slider'
44version : 1.6.9
5- image : " components/range-slider.svg"
5+ image : ' components/range-slider.svg'
6+ description :
7+ ' The RangeSlider is a multi thumb slider used to select a range of related
8+ values.'
69---
710
811The ` RangeSlider ` is a multi thumb slider used to select a range of related
912values. A common use-case of this component is a price range picker that allows
1013a user to set the minimum and maximum price.
1114
1215<ComponentLinks
13- theme = { { componentName: " slider" }}
14- github = { { package: " slider" }}
15- npm = { { package: " @chakra-ui/slider" }}
16+ theme = { { componentName: ' slider' }}
17+ github = { { package: ' slider' }}
18+ npm = { { package: ' @chakra-ui/slider' }}
1619/>
1720
1821<carbon-ad ></carbon-ad >
@@ -33,7 +36,7 @@ import {
3336 RangeSliderTrack ,
3437 RangeSliderFilledTrack ,
3538 RangeSliderThumb ,
36- } from " @chakra-ui/react"
39+ } from ' @chakra-ui/react' ;
3740```
3841
3942## Usage
@@ -42,7 +45,7 @@ import {
4245> provide an accessible label for the Slider.
4346
4447``` jsx
45- < RangeSlider aria- label= {[" min" , " max" ]} defaultValue= {[10 , 30 ]}>
48+ < RangeSlider aria- label= {[' min' , ' max' ]} defaultValue= {[10 , 30 ]}>
4649 < RangeSliderTrack>
4750 < RangeSliderFilledTrack / >
4851 < / RangeSliderTrack>
@@ -58,8 +61,8 @@ You can override the color scheme of the slider to any color key specified in
5861
5962``` jsx
6063< RangeSlider
61- aria- label= {[" min" , " max" ]}
62- colorScheme= " pink"
64+ aria- label= {[' min' , ' max' ]}
65+ colorScheme= ' pink'
6366 defaultValue= {[10 , 30 ]}
6467>
6568 < RangeSliderTrack>
@@ -77,11 +80,11 @@ it vertical, pass the `orientation` prop and set its value to `vertical`.
7780
7881``` jsx
7982< RangeSlider
80- aria- label= {[" min" , " max" ]}
81- colorScheme= " pink"
83+ aria- label= {[' min' , ' max' ]}
84+ colorScheme= ' pink'
8285 defaultValue= {[10 , 30 ]}
83- orientation= " vertical"
84- minH= " 32 "
86+ orientation= ' vertical'
87+ minH= ' 32 '
8588>
8689 < RangeSliderTrack>
8790 < RangeSliderFilledTrack / >
@@ -97,15 +100,15 @@ it vertical, pass the `orientation` prop and set its value to `vertical`.
97100customize its styles.
98101
99102``` jsx
100- < RangeSlider aria- label= {[" min" , " max" ]} defaultValue= {[30 , 80 ]}>
101- < RangeSliderTrack bg= " red.100" >
102- < RangeSliderFilledTrack bg= " tomato" / >
103+ < RangeSlider aria- label= {[' min' , ' max' ]} defaultValue= {[30 , 80 ]}>
104+ < RangeSliderTrack bg= ' red.100' >
105+ < RangeSliderFilledTrack bg= ' tomato' / >
103106 < / RangeSliderTrack>
104107 < RangeSliderThumb boxSize= {6 } index= {0 }>
105- < Box color= " tomato" as= {MdGraphicEq} / >
108+ < Box color= ' tomato' as= {MdGraphicEq} / >
106109 < / RangeSliderThumb>
107110 < RangeSliderThumb boxSize= {6 } index= {1 }>
108- < Box color= " tomato" as= {MdGraphicEq} / >
111+ < Box color= ' tomato' as= {MdGraphicEq} / >
109112 < / RangeSliderThumb>
110113< / RangeSlider>
111114```
@@ -117,8 +120,8 @@ accomplished using the `step` prop.
117120
118121``` jsx
119122< RangeSlider defaultValue= {[120 , 240 ]} min= {0 } max= {300 } step= {30 }>
120- < RangeSliderTrack bg= " red.100" >
121- < RangeSliderFilledTrack bg= " tomato" / >
123+ < RangeSliderTrack bg= ' red.100' >
124+ < RangeSliderFilledTrack bg= ' tomato' / >
122125 < / RangeSliderTrack>
123126 < RangeSliderThumb boxSize= {6 } index= {0 } / >
124127 < RangeSliderThumb boxSize= {6 } index= {1 } / >
@@ -133,7 +136,7 @@ interested in the final result after sliding is complete. You can use
133136
134137``` jsx live=false
135138< RangeSlider
136- aria- label= {[" min" , " max" ]}
139+ aria- label= {[' min' , ' max' ]}
137140 onChangeEnd= {(val ) => console .log (val)}
138141>
139142 < RangeSliderTrack>
@@ -157,7 +160,7 @@ The `RangeSlider` component wraps all its children in the
157160[ Box] ( /docs/layout/box ) component, so you can pass all ` Box ` props to change its
158161style.
159162
160- <PropsTable of = " RangeSlider" />
163+ <PropsTable of = ' RangeSlider' />
161164
162165### RangeSliderThumb Props
163166
0 commit comments