Scientists continue to discover new biological mechanisms in human and animal health with in vivo microscopy. To observe dynamic phenomena as they occur, intact and thick samples are often needed for observation. Within these living tissues, microscopists must be able to follow specific trajectories in a 3D volume, track/stabilize features of interest, and minimize agitation of the sample during imaging. Varifocus elements allow for fast electronic focusing without translation of the sample stage or objective lens, thereby enabling dynamic and agile imaging within thick samples. This Spotlight introduces miniature varifocus elements and presents the optical equations needed to integrate such elements with microscopes. It reviews the current technological capabilities and limitations of varifocus elements, such as liquid crystal devices, liquid lenses, vertical displacement microlenses, and deformable membrane mirrors. A discussion of varifocus elements demonstrated in widefield microscopes, confocal microscopes, two-photon microscopes, and optical coherence tomography is included.