custom-cards / slider-button-card

A button card with integrated slider
MIT License
105 stars 16 forks source link

Slider size control #26

Open raven42 opened 1 year ago

raven42 commented 1 year ago

Would it be possible to add a control to change the size of the slider portion of the card? I am thinking instead of having the slider be the entire card height / width, if it would be possible to have the slider itself only be a smaller portion of the card.

Ultimately one issue I'm hoping to solve with this is when using the Home Assistant app on my phone. I have a dashboard that has a grid layout of a number of lights / switches in a 3x# layout. When attempting to scroll the page, I seem to get caught up on the sliders a lot even when the slider is set only left to right, but I'm trying to scroll up / down. It seems as though if I start with my thumb on top of any slider when in any position, it interprets the movement as adjusting the slider and not trying to scroll.

If we could have only a portion of the card be the slider position, then it would be easier to click on a clear part of the card that would allow proper detection of scrolling. It would also allow for a visually different appearance so if using a background image in the dashboard, the solid color sliders would be a little more clear to use, but also allow for some visual of the background to come through.