Fully-aromatic, two-dimensional covalent organic frameworks (2D COFs) are hailed as candidates for electronic and optical devices, yet to-date few applications emerged that make genuine use of their rational, predictive design principles and permanent pore structure. Here, we present a 2D COF made up of chemoresistant beta-amino enone bridges and Lewis-basic triazine moieties that exhibits a dramatic real-time response in the visible spectrum and an increase in bulk conductivity by two orders of magnitude to a chemical trigger - corrosive HCl vapours.
The optical and electronic response is fully reversible using a chemical switch (NH3 vapours) or physical triggers (temperature or vacuum). These findings demonstrate a useful application of fully-aromatic 2D COFs as real-time responsive chemosensors and switches.