Open PixeledCode opened 1 year ago
The': active' selector does not work on the Slider component since it's not built using the input element. Is it possible to add some class or data attribute indicating that the thumb is currently pressed?
input
https://polaris.shopify.com/components/selection-and-input/range-slider On clicking the thumb in Polaris' Slider, we can use the :active selector to add styling.
:active
Anyone who would want more control over the component's styling in this particular state.
I tried using onMouseDown and onMouseDown but they are not working since dragging is enabled on this element.
onMouseDown
Best to go with manually adding event handlers, onPointerDown instead of onMouseDown
onPointerDown
Feature request
Overview
The': active' selector does not work on the Slider component since it's not built using the
input
element. Is it possible to add some class or data attribute indicating that the thumb is currently pressed?Examples in other libraries
https://polaris.shopify.com/components/selection-and-input/range-slider On clicking the thumb in Polaris' Slider, we can use the
:active
selector to add styling.Who does this impact? Who is this for?
Anyone who would want more control over the component's styling in this particular state.
Additional context
I tried using
onMouseDown
andonMouseDown
but they are not working since dragging is enabled on this element.