Two-dimensional atomic heterostructures combined with metallic nanostructures allow one to realize strong light–matter interactions. Metallic nanostructures possess plasmonic resonances that can be modulated by graphene gating. In particular, spectrally narrow plasmon resonances potentially allow for very high graphene-enabled modulation depth. However, the modulation depths achieved with this approach have so far been low and the modulation wavelength range limited. Here we demonstrate a device in which a graphene/hexagonal boron nitride heterostructure is suspended over a gold nanostripe array. A gate voltage across these devices alters the location of the two-dimensional crystals, creating strong optical modulation of its reflection spectra at multiple wavelengths: in ultraviolet Fabry–Perot resonances, in visible and near-infrared diffraction-coupled plasmonic resonances and in the mid-infrared range of hexagonal boron nitride’s upper Reststrahlen band. Devices can be extremely subwavelength in thickness and exhibit compact and truly broadband modulation of optical signals using heterostructures of two-dimensional materials.