A supramolecular strategy based on molecular dipole moments for high-quality covalent organic frameworks.