Mixing of complex fluids at low Reynolds number is fundamental for a broad range of applications, including materials assembly, microfluidics, and biomedical devices. Of these materials, yield stress fluids (and gels) pose the most significant challenges, especially when they must be mixed in low volumes over short timescales. New scaling relationships between mixer dimensions and operating conditions are derived and experimentally verified to create a framework for designing active microfluidic mixers that can efficiently homogenize a wide range of complex fluids. Active mixing printheads are then designed and implemented for multimaterial 3D printing of viscoelastic inks with programmable control of local composition. microfluidic mixing | yield stress fluids | 3D printing | graded materials M ixing at low Reynolds number is important for many processes (1, 2) from bioassays (3) and medical analysis (4), to materials synthesis (5) and patterning (6). Microfluidic devices that passively mix small fluid volumes (7-9) via chaotic advection or secondary flows have been implemented for many targeted applications (10-12). Passive mixers are simple and operate with no moving parts, but their mixing efficiency is strongly coupled to flow rate and geometry. Moreover, they are typically suited only for low-viscosity fluids containing diffusive species, such as colloidal particles (13). Whereas elastic instabilities have been shown to drive mixing of weakly viscoelastic polymer solutions in microfluidic devices (14), there is growing interest in continuous mixing of strongly viscoelastic materials, i.e., yield stress fluids, in microchannels, which until now has only been demonstrated at the macroscale (15, 16). The ability to uniformly and rapidly mix such liquids at the microscale would open new avenues for myriad applications, including additive manufacturing (17, 18). For example, concentrated viscoelastic inks are patterned by direct ink writing, an extrusion-based 3D printing method (19). To date, this flexible printing method has been used to create ceramic (20, 21), polymeric (22), metallic (23), and composite (24) architectures as well as vascularized tissues (25). In each case, the ink composition remains constant during the printing process. The ability to create more complex architectures with local compositional gradients is cumbersome at best, requiring a coordinated printpath between multiple individually addressable printheads--each of which contains a different ink (25).To overcome this challenge, we design, characterize, and exploit the mixing efficiency of an active mixer that homogenizes multiple materials at the microscale. To understand the relative advantages of active mixing, we derive and experimentally validate scaling relationships that are consistent with existing theory for passive mixers (10). To our knowledge, this is the first quantitative explanation of the mechanism by which an active microfluidic mixer decouples the intensity of the chaotic advection from the flow rate. This unique feat...