Two-dimensional (2D) materials are building blocks for the next generation of electronic and optoelectronic devices.