Specifically, we discuss recognition elements encapsulated within synthetic hydrogels, synthetic polymers grafted with biological molecules that form freestanding gels, and gels made of naturally occurring polymers, such as proteins or polysaccharides.