  Diffractive photonic devices manipulate light via local and nonlocal optical
modes. Local devices, such as metasurfaces, can shape a wavefront at multiple
selected wavelengths, but inevitably modify light across the spectrum; nonlocal
devices, such as grating filters, offer great frequency selectivity but limited
spatial control. Here, we introduce a rational design paradigm using
quasi-bound states in the continuum to realize multifunctional nonlocal
devices: metasurfaces that produce narrowband spatially tailored wavefronts at
multiple selected wavelengths and yet are otherwise transparent.
