Documentation
Slider

Slider

Example

import { Slider } from '@i4o/catalystui'
 
export default () => {
	return (
		<Slider
			ariaLabel='Test Slider'
			defaultValue={[4, 12]}
			min={0}
			max={20}
			name='test-slider'
			step={1}
		/>
	)
}

Props

NameTypeDefaultDescription
ariaLabelstring''Aria Label for the Slider
defaultValuenumber[]-Default value(s) of the slider. Use for uncontrolled operations.
valuenumber[]-Value(s) of the slider. Use for controlled operations (along with onValueChange).
onValueChange(value: number[]) => void-This function is called when the slider value changes.
onValueCommit(value: number[]) => void-This function is called when the slider value changes but only at the end of the interaction. Use when you only need the final value.
namestring''Name of the slider component
minnumber0Minimum value of the slider
maxnumber100Maximum value of the slider
stepnumber1Stepping interval for the slider