How to update default param for pn.Param widgets?

An alternative to the for loop after the creation is:

import param
import panel as pn
import holoviews as hv

pn.extension()

class TestParam(param.Parameterized):

    a = param.Number(default=1, bounds=(0, 10))
    b = param.String(default="b")


dd = {k: {"width": 100} for k in TestParam.param}
col = pn.Param(TestParam, width=100, widgets=dd)
col
2 Likes