Custom widget visibility according switch state

Hi,
is it possible to program the widget code fro masking of appearance in habpanel according switch item value please ?
I need to mask (disappear) whole custom widget. It is only used in special initialisation phase.
Thanks.
Openhab2.5.12 raspbian bullseye