See the Pen Show/hide example by Val Head (@valhead) on CodePen.

A full-width figure with an embedded pen from CodePen.