Is there any way to set the initial value of a slider?
Yep! You can use the value=
attribute when you write an html
literal, or specify value:
if you’re using Jeremy’s inputs notebook. Here are examples of each: https://beta.observablehq.com/d/4f83459b7f9460b5
There’s also the DOM.range
helper - but we’re deprecating that helper because it’s not much quicker than writing a html
literal and makes small tweaks and additions (like adding more HTML attributes like this one) less obvious.
1 Like
see
related, if you want to mingle it in inline md: