The formation of spatiotemporal patterns of gene expression is frequently guided by gradients of diffusible signaling molecules. The toggle switch subnetwork, composed of two cross-repressing transcription factors, is a common component of gene regulatory networks in charge of patterning, converting the continuous information provided by the gradient into discrete abutting stripes of gene expression. We present a synthetic biology framework to understand and characterize the spatiotemporal patterning properties of the toggle switch. To this end, we built a synthetic toggle switch controllable by diffusible molecules in Escherichia coli. We analyzed the patterning capabilities of the circuit by combining quantitative measurements with a mathematical reconstruction of the underlying dynamical system. The toggle switch can produce robust patterns with sharp boundaries, governed by bistability and hysteresis. We further demonstrate how the hysteresis, position, timing, and precision of the boundary can be controlled, highlighting the dynamical flexibility of the circuit.