Modebar visibility toggle

I need to toggle the modebar visibility through a button. Is there any way for that?

You can try something like: https://codepen.io/etpinard/pen/QgRZqM

hey is this good when you consider performance? relayout does not seem to work with this.

Thanks

Right, displyaModeBar is a config option, not a layout attribute.