flowbite-react icon indicating copy to clipboard operation
flowbite-react copied to clipboard

Range slider is not vertically centerable

Open phbernard opened this issue 1 year ago • 1 comments

  • [x] I have searched the Issues to see if this bug has already been reported
  • [x] I have tested the latest version

Steps to reproduce

  1. Go to the Flowbite React official doc
  2. With dev tools, highlight the surrounding div of the first range slider: image
  3. Look at the range slider container. The range is not vertically centered in the container. This is clearly visible with the blue circle: it touches the bottom of the container box but not the top. image

Current behavior

The ranger slider is not centered in its container. Therefore it is hard to vertically center the whole component.

Expected behavior

The input fields should be vertically centered inside the range slider container.

Context

This behavior can prevent a range slider from being vertically centered along with other components, for example with a flex and items-center. The range slider is "a little lower" than the other vertically centered components.

This behavior can be observed with Chrome 120.0.6099.130 and Firefox 121.0. The issue can be observed right from the Flowbite React docs, so it must be present in the latest Flowbite React version.

phbernard avatar Dec 27 '23 18:12 phbernard

Thanks, I agree this should probably be fixed. The vanilla Range slider is actually simpler than what we implemented, so it would be prudent to revert to the vanilla library's design here which also solves this problem.

tulup-conner avatar Jan 01 '24 07:01 tulup-conner