A non-planar 2D covalent organic framework derived from a Z-shaped building unit.