AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.07k stars 351 forks source link

Any plans to implement a slider #357

Open droctothorpe opened 3 years ago

droctothorpe commented 3 years ago

...along the lines of https://github.com/piotrmurach/tty-prompt#210-slider?

I might be interested in contributing this as a PR.

AlecAivazis commented 3 years ago

Oh interesting!

I hadn’t considered a prompt like that before but it would definitely be cool to add to the set. Let me know if you need any guidance with this

mislav commented 2 years ago

I would vote no on a slider prompt. It would be an accessibility and a usability nightmare. A number input would be superior in almost every way.

droctothorpe commented 2 years ago

They're not mutually exclusive. It can be keyboard driven as well. Left / right and up / down can adjust the slider. Holding down shift can increment by 10 instead of 1.

droctothorpe commented 2 years ago

Apologies for the delayed response. I'm not sure if / when I'll have time to tackle this but definitely interested. I can loop around to it if no else one gets to it first.