# Combined sliders with values shown

**URL:** <https://discourse.julialang.org/t/combined-sliders-with-values-shown/111101>\
**Category:** Pluto\
**Tags:** question\
**Created:** [March 3, 2024, 6:22pm UTC](https://discourse.julialang.org/t/combined-sliders-with-values-shown/111101 "2024-03-03T18:22:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KajWiik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kajwiik/32/199_2.png) [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Post date:** [March 3, 2024, 6:22pm UTC](https://discourse.julialang.org/t/combined-sliders-with-values-shown/111101/1 "2024-03-03T18:22:52Z")

</div>

I am trying to render a bunch of custom sliders that show value with the slider.

This function works just fine:

```julia
function slider_value(;default = 28, min = 1, max = 100)
@htl("""<input type="range" value="$(default)" min="$(min)" max="$(max)" oninput="this.nextElementSibling.value = this.value">
<output>24</output>""")
end

```

and renders a slider with a value at right:

 ![Screenshot from 2024-03-03 20-14-29](https://global.discourse-cdn.com/julialang/original/3X/4/6/4632a5fdeabecc59cfa8debd48787561310268b3.png)

But when I try to use `combine`

```julia
function combined_sliders(names)
	PlutoUI.combine() do Child
		@htl("""
		<ul>
		$([
			@htl("""<li>$(name): $(Child(slider_value()))""")
			for name in names
		])
		</ul>
		""")
	end
end

```

the value at the right of the slider does not update anymore:

 ![Screenshot from 2024-03-03 20-18-27](https://global.discourse-cdn.com/julialang/original/3X/a/1/a129cbdff245f49af2863e8914c3c1d250d54c05.png)

Any ideas?

Here’s the [full notebook](https://public-notebooks-kjwiik-32dc5084d26be00b1950ac48350621eb6124dc2.utugit.fi/sliders.html).

Edited: left → right 🙄

---

<div class="post-metadata">

**Author:** ![disberd](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@disberd](https://discourse.julialang.org/u/disberd)\
**Post date:** [March 3, 2024, 8:25pm UTC](https://discourse.julialang.org/t/combined-sliders-with-values-shown/111101/2 "2024-03-03T20:25:24Z")

</div>

Do you know that you can use `Slider(x; show_value = true)` to achieve what you want without doing a custom html element?

---

<div class="post-metadata">

**Author:** ![KajWiik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kajwiik/32/199_2.png) [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Post date:** [March 3, 2024, 8:32pm UTC](https://discourse.julialang.org/t/combined-sliders-with-values-shown/111101/3 "2024-03-03T20:32:39Z")

</div>

No, I did not 😳. That works also with `combine` perfectly. Thanks!  
It seems that one should reread the documentation carefully and often…
