A luminescent metal-organic framework constructed using a tetraphenylethene-based ligand for sensing volatile organic compounds.