PlutoUI.jl
PlutoUI.jl copied to clipboard
Make show_value=true the default for Slider and show the variable name
Sliders are more useful when the value is displayed next to them. It would be great to have the name of the variable displayed too.
Edit from @fonsp: In this issue we are referring to:
@bind x Slider(1:100, show_value=true)
and whether to make it true by default.
Just for the sake of completeness until the issue is closed (and that I didn't see it in another place), I achieved this as follows if anyone needs it:
begin
k_slider = @bind K html"<input type='range' min='0.0' max='100' step='1.' value='50.' oninput='k.value=this.value'>"
k_value = html"<output id='k'>50</output>"
md"""
Strike Price: $k_slider $k_value
"""
end

Edit from @fonsp: this is built in to PlutoUI 🌈, I have edited the original issue to clarify this. I will hide this comment to prevent confusion for people who stumble into it.
+1, I ALWAYS want the value shown.