PlutoUI.jl
                                
                                 PlutoUI.jl copied to clipboard
                                
                                    PlutoUI.jl copied to clipboard
                            
                            
                            
                        Input Labels
It would be nice to pass a label to the input so that you don't need to use a different cell to display the value. Maybe as an optional keyword arg?
Something like:
@bind balloons Slider(1:100; label = "Number of Balloons")
?
I might be able to tackle this if the API/idea is supported. I think the changes would be straightforward:
- Update structs to include a label field (nothingwould be default)
- Update the HTML to include a compatible label
Related question though:
Using the form <label> element causes the variable not to bind:

But this works:

Should the former work?
@bind takes the .value and input events of the first element, but <label> doesn't have those. You need to wrap it in a <span> and include a script that relays the events
Mind that you can do
md"Number of balloons $(@bind x Slider(1:100))"
The only difference is that this doesn't create a <label> with the for attribute set, which would allow you to click on the label to check/uncheck a checkbox, for example. Also helps a bit with screen readers