AngleSlider
Pick angle value between 0 and 360
Import
Source
Docs
Package
Usage
Use AngleSlider
component to pick angle value between 0 and 360:
Controlled
formatLabel
To change angle label format use formatLabel
prop.
It accepts function that takes the angle value and returns React node:
Marks
Set marks
prop to display marks on the slider. In mark object value
is required,
label
is optional. To restrict selection to marks only, set restrictToMarks
prop:
onChangeEnd
onChangeEnd
callback is called when user the slider is stopped from being dragged or value is changed with keyboard.
You can use it as a debounced callback to avoid too frequent updates.
Current value: 0
End value: 0
Accessibility
AngleSlider
is fully accessible and supports keyboard interactions:
ArrowLeft
/ArrowDown
andArrowRight
/Arrowup
decrease/increase value bystep
Home
to set value to 0End
to set value to 359
To make the component visible to screen readers, set aria-label
prop: