Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Enhancement: Slider component can display it's current value #324

Open
valentijnnieman opened this issue Oct 10, 2018 · 3 comments
Open

Comments

@valentijnnieman
Copy link
Contributor

A nice update to the Slider component would be to have it be able to display it's current value. It could be toggled on/off with a prop like display_value, which maybe defaults to false so it doesn't change behaviour. If true, it could display the value in a <div/> or <label/> below it (or above it?) and perhaps it could be styled with props like value_style and value_className. Perhaps a better name would be label, so display_label, label_style, and label_className.

@dhuang612
Copy link

I would like to work on this issue

@alexcjohnson
Copy link
Collaborator

@dhuang612 Great, we'd love to have your contribution! I'm thinking the props might be

  • value_side: 'none' (default), 'left', 'right', 'top', 'bottom' - personally I feel like left and right are the most important, at least for horizontal sliders, but top and bottom could be nice as well... even 'top left' etc. But we wouldn't insist on all possibilities from the beginning, you're welcome to include the options you would find most useful.
  • value_style
  • value_className
  • More could be added, like value_format, value_prefix, value_suffix but again not necessary in the first iteration unless they would be particularly useful to you. If we did add these formatting options we could make them apply to tooltips as well.

@wbrgss
Copy link
Contributor

wbrgss commented Jun 17, 2020

FYI, this is possible with tooltips now as of #564

I think we discussed having a Slider "companion" as well to display the current value, so in that spirit I'll leave this issue open unless others think the tooltips alone are adequate. Also, tooltips do have some flaws upstream as documented in #763 and #374

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants