Porous metal-organic frameworks (MOFs) demonstrate great potential for numerous applications. Although hetero-functional components have been encapsulated within MOF crystalline particles, the uniform incorporation of functional species with different sizes, shapes and functions in MOF thin films with dual properties, especially at room temperature and without the degradation of the MOF framework, remains a significant challenge towards further enriching their functions for various purposes. Here we report a general method that can rapidly encapsulate diverse functional components, including small ions, micrometresized particles, inorganic nanoparticles and bioactive proteins, in MOF thin films at room temperature via a metal-hydroxide-nanostrand-assisted confinement technique. These functional component-encapsulated MOF composite thin films exhibit synergistic and size-selective catalytic, bio-electrochemical, conductive and flexible functionalities that are desirable for thin film devices, including catalytic membrane reactors, biosensors and flexible electronic devices.