Hi @JhonnyKokos
Is it something like this you are looking for?
import param
from bokeh.models.formatters import PrintfTickFormatter
import panel as pn
pn.sizing_mode = "stretch_width"
class MyDucksComponent(param.Parameterized):
value = param.Integer(1, bounds=(1, 5))
# C.f. https://panel.holoviz.org/reference/widgets/IntSlider.html?highlight=intslider
value_format = PrintfTickFormatter(format="%d Ducks")
component = MyDucksComponent()
value_slider = pn.Param(component, widgets={"value": {"format": value_format}})[1]
@pn.depends(value=value_slider)
def duck_string(value):
return pn.pane.Str("🦆 " * value, height=50)
pn.template.FastListTemplate(
title="Panel - Slider with dynamic label", main=[value_slider, duck_string]
).servable()
dynamic-slider