Hello,
I was wondering if it would be possible to customize panel widgets design.
For example, I am not really crazy about the Select widgets (screenshot below)
I have already tried to modify the CSS, but the modifications are limited.
Same question for the loading spinner is it possible to use a custom one ?
Create custom widgets via ReactiveHTML. For example by using nice looking web components like Select (shoelace.style). Doing this for a couple of components is realistic. But creating a full set of widgets that are compatible with the existing Panel widgets is a big effort.
Thank you very much, this is exactly what I was looking for.
Do you know how to use, for example, the ShoelaceSelect as a panel widgets ?
More precisely, is it possible to inherit the ShoelaceSelect from the panel.widgets.Select object while keeping its customised design and hence to be able to have a watcher over a param variable which stored the value of the ShoelaceSelect widget ?
The ShoelaceSelect widget above works just as the normal Select because it also has the value and options parameter. So you can depend, bind etc. on select.param.value as you would normally do.
import panel as pn
pn.extension()
select = ShoelaceSelect(options=["apple", "pear", "banana"], name="Fruit")
def to_string(value):
return f"The value is {value}"
ito_string = pn.bind(to_string, value=select.param.value)
pn.Column(select, select.param.value, pn.panel(ito_string, width=300)).servable()