The functionalization of a hydrogel with target molecules is one of the key steps in its various applications. Here, a versatile approach is demonstrated to functionalize a micropatterned hydrogel, which is formed by “thiol-yne” photo-click reaction between the yne-ended hyperbranched poly(ether amine) (hPEA-yne) and thiol-containing polyhedral oligomeric silsesquioxane (PEG-POSS-SH). By controlling the molar ratio between hPEA-yne and PEG-POSS-SH, patterned hydrogels containing thiol or yne groups are obtained. A series of thiol-based click chemistry such as “thiol-epoxy”, “thiol-halogen”, “thiol-ene”, and “thiol-isocyanate” are used to functionalize the thiol-containing hydrogel (Gel-1), while the yne-containing hydrogel (Gel-2) is functionalized through a typical copper-catalysed alkyne-azide reaction (CuAAC). FTIR, UV-vis spectra and confocal laser scanning microscopy (CLSM) are used to trace these click reactions. Due to the selective adsorption to the hydrophilic dyes, the obtained patterned hydrogel of hPEA modified with fluorescence dye is further demonstrated in application for the recognition of guest molecules.