PLutoUI -- Can I make a Slider With a Text Box Option

In a Pluto Notebook, I would like to have a value driven by a slider, but I would also like the option to override that slider value with a text input. Or have them linked in someway.

Any thoughts on how to accomplish this?

Best Regards,

1 Like

What would the override/link logic look like? Here’s an example that just checks the value of the slider variable and returns either that value or the value of the text variable:

I’m assuming you need more complex logic?

I guess I need a way for the user to be able to type a number to jump the slider to the value typed. Perhaps it could be mechanized with the “default” value being a variable itself… but it seems like there needs to be a little bit of a circular loop here if the objects are separate. I didn’t know if you could use “combine” some way to combine a slider and a text box, so if one was updated, it could update the other. Then basically, the last one updated would win. If the reader wanted to type a number, they could. If they wanted to grab the scrollbar they could. They would both feed the same variable somehow.

How about this?