Introduction

Understanding the process of cancer cell spreading, migration, and metastasis is of paramount significance in both cancer biology and therapy1. One critical factor influencing these processes is the viscoelasticity of extracellular matrices2. The viscoelasticity of cancer tissues is a multifaceted characteristic marked by spatial and temporal heterogeneity3. Spatial heterogeneity underscores the variability in viscoelastic properties observed across different regions within cancerous tissues4. In parallel, temporal heterogeneity5 highlights the dynamic nature of cancer tissue viscoelasticity6, as it evolves over time. Taken together, the spatiotemporal variations of viscoelasticity within the tissue7 may act as cues guiding cancer development. To understand how cancer cells sense and interpret such mechanical signals8, it is essential to exert precise control over the temporal and spatial aspects of the matrix’s viscoelasticity across different timescales.

Light-based strategies have emerged as powerful tools to replicate heterogeneous environments9,10, allowing for fast, reversible, dose-dependent, and localized control of the matrix’s mechanical properties11. For instance, introducing an allyl sulfide cross-linker12,13 facilitated adjustments to hydrogel viscoelasticity during light exposure through cross-link rearrangement. Incorporating an external photoinitiator generated the necessary free radicals for mediation, inducing viscoelastic changes within minutes. Light-mediated thiol-ene addition was employed to further introduce covalent or supramolecular cross-links, allowing for modulation of viscoelastic properties14. Dithiolane hydrogels featuring disulfide crosslinks demonstrated photoinduced changes in viscoelasticity via disulfide metathesis and thiol-disulfide exchange15. This behavior could be manipulated by introducing tetraPEG-thiol (excess free thiols) to accelerate the rate of bond exchange16. It is important to highlight that current methodologies predominantly utilize UV light, which is known for its potential toxicity and limited capacity to regulate stress relaxation over short durations (seconds)17. Notably, the rate of stress relaxation varies significantly across different tissues, ranging from hours to seconds. The mechanisms by which cells sense and respond to spatiotemporal variations of viscoelasticity over prolonged timescales remain largely unexplored. Additionally, these UV-based techniques often necessitate the incorporation of external substances like photoinitiators to alter the hydrogel’s viscoelasticity, which consequently modifies its chemical composition8 This modification can lead to interference from chemical factors on cell behavior. Therefore, there is an urgent need for innovative strategies that enable fully spatiotemporal modulation of viscoelastic properties across various timescales, employing cell-friendly light sources and eliminating the requirement for external compounds.

Herein, we propose a dual mechanism for stress relaxation regulation- both intrinsic and responsive- to construct dynamic hydrogel platforms. These platforms were constructed using dynamic crosslinkers with two aldehyde ends that form Schiff base bonds with carboxymethyl-chitosan. By altering the structure of the aldehyde component, we can precisely adjust the hydrogel’s intrinsic stress relaxation time from 3400 s to 500 s via a reversible imine metathesis reaction (Fig. 1). The visible light-responsive stress relaxation is achieved through the incorporation of a thiuram disulfide (TDS) moiety in hydrogel. The TDS, characterized by S-S bonds with lower bond energy than standard disulfide bonds, exhibits slow disulfide metathesis under standard conditions yet allows for accelerated metathesis when exposed to visible light18. Such exposure significantly accelerates the stress relaxation time of the hydrogel, reducing it to half of its initial value. Our design has several advantages: (1) it enables precise, on-demand control of stress relaxation rates across various time scales; (2) the photoresponsive exchange reaction process is efficient and free from the additional compounds, eliminating the interference from chemical factors change on cell behavior. (3) The activation wavelength falls within the non-cytotoxic visible light range, allowing for extended periods of light exposure. Leveraging this hydrogel platform, we explore the alterations in cell spreading under in situ variations of stress relaxation. Subsequently, we developed photopatterned substrates that allowed for spatiotemporal control of viscoelastic properties, and we examined how spatial heterogeneity influences cancer cell migration.

Fig. 1: The design and operational mechanism of the hydrogel platform.
figure 1

This diagram depicts the dual regulation capabilities of the hydrogel: intrinsic stress relaxation and responsive stress relaxation triggered by light exposure. The hydrogel is prepared through a Schiff base reaction, involving the dual dynamic crosslinkers and carboxymethyl-chitosan (CMCS, 30 kDa). The hydrogel’s ability to undergo intrinsic stress relaxation, with time reduction from 3400 s to 500 s, is facilitated by varying the aldehyde components which allow for imine metathesis. The TDS component within the hydrogel initiates a radical-induced disulfide metathesis upon light exposure, leading to a dose-dependent re-organization of the polymer network, thereby enabling controlled stress relaxation.

Results and discussion

Hydrogels with both intrinsic and visible light-responsive viscoelasticity

We designed three crosslinkers containing the TDS moiety, each with a distinct aldehyde chemical structure (Fig. 1), for this study: 4,4’-(disulfanne-1,2-dicarbonothioyl)bis(1-(3-formyl-4-hydroxybenzyl)−1-methylpiperazin-1-ium) (ALYDS), 4,4’-(disulfanne-1,2-dicarbonothioyl)bis(1-(2-formyl-3-oxopropyl)−1-methylpiperazin-1-ium) (MDADS) and 4,4’-(disulfanne-1,2-dicarbonothioyl)bis(1-(4-formylbenzyl)−1-methylpiperazin-1-ium) (PBEDS) as detailed in supporting information. The selection of these aldehydes was based on their documented kinetic rates for imine formation and hydrolysis, which are known to influence the hydrogel’s stress relaxation19,20. Hydrogels were synthesized by mixing a crosslinker with CMCS under ambient conditions (room temperature, pH 7.4), forming dynamic imine/Schiff-base bonds (Supplementary Fig. 1 and Table 1).

Rheological measurements were employed to determine the hydrogels’ ultimate shear storage modulus (G’). For the ALYDS hydrogel, G’ in the range of 500 Pa to 10 kPa were achieved (Supplementary Fig. 1a, b, and Table 1) by varying the concentration of crosslinker (1 wt% to 4 wt%) and CMCS (3 wt% to 7 wt%). Hydrogels with a G’ of 2 kPa were selected for stress relaxation, while the stress relaxation rate was quantified using the time taken for the initial stress to relax to half its original value (τ1/2)21. This intrinsic stress relaxation in hydrogels is attributed to Schiff base linkages. In contrast, a control hydrogel containing TDS, yet without Schiff base crosslinking, exhibited intrinsic stress relaxation at a rate nearly 8-fold slower than that of the ALYDS hydrogel (Supplementary Fig. 2, and Tables 2 and 3). The intrinsic stress relaxation times of hydrogels crosslinked with ALYDS, MDADS, and PBEDS varied widely, ranging from 3400 s to 500 s, as shown in Fig. 2b. Firstly, we analyzed the imine reaction rate constants (k1) and (k−1) for different aldehydes using UV spectroscopy. The reverse reaction rate (k−1) is crucial as it influences the material’s ability to dissipate applied stress, thereby affecting the stress-relaxation velocity22. Notably, the ALYDS hydrogel, crosslinked using salicylaldehyde, exhibited a slower reaction rate constant (k−1) of 0.00109·s−1, leading to a longer τ1/2 of 3400 s. In contrast, PBEDS demonstrated a faster rate constant (k−1) of 0.0017·s−1, resulting in a reduced τ1/2 of 500 s (Supplementary Table 4 and Figs. 3, 4 and details in supporting information). Moreover, hydrogels’ intrinsic stress relaxation properties can be altered by changing the crosslinking density or polymer concentration (Supplementary Fig. 5a, b). Under light exposure at 20 mW/cm2 (445 nm laser), all τ1/2 values decreased to half of their original values (Fig. 2b and Supplementary Fig. 5), indicating a visible-light-induced responsive behavior. The normalized stress (σ/σmax)23 decreased more rapidly in response to higher light intensity (Fig. 2c). Take ALYDS hydrogel as an example, τ1/2 decreased from 3400 ± 410 s to 1500 ± 230 s as the light intensity increased from 0 to 40 mW/cm2 (Fig. 2d). In contrast, a control hydrogel, N1, N3-bis(3-formyl-4-hydroxybenzyl)-N1, N1, N3, N3-tetramethylpropane-1,3-diaminium (C3-ALY), which lacked the TDS moiety, did not exhibit the accelerated stress relaxation under identical light exposure conditions, maintaining an intrinsic stress relaxation rate at 2700 s (Supplementary Fig. 6).

Fig. 2: The regulation of the stress-relaxation of the dual dynamic hydrogel by visible light.
figure 2

a The stress-relaxation of the hydrogels with different dynamic cross-linkers under the dark condition, as measured by rheology, with constant stiffness at 2 kPa. b Analysis of changes in stress-relaxation behavior using different crosslinkers, with the light intensity fixed at 20 mW/cm² as depicted in a. n = 8, 9 (ALYDS), 6 and 7 (MDADS), 4,4 (PBEDDS) independent samples (0, 20 mW/cm²). c Stress relaxation tests on a dynamically crosslinked ALYDS hydrogel subjected to 15% strain, with stress values normalized to the initial stress. d τ1/2 of the ALYDS hydrogel under various light exposure conditions, as measured by rheology. n = 7, 9, 8, 9, 9 (0, 5, 10, 20, 40 mW/cm²) independent samples. e Time-dependent changes in viscoelastic creep compliance (J) of the ALYDS hydrogel. f Variation in linear average creep rates (<1/η>) of ALYDS hydrogel under different light intensities as depicted in. n = 3 per group from 3 independent hydrogels. g Exchange reactions involving TETD and PBEDS. h HPLC analysis of the mixed PBEDS (0.01 M) and TETD (0.01 M) in CH3CN/H2O over time. i Reactant concentration change in the dark and under visible light (445 nm) in CH3CN/H2O at room temperature. j Rate constant (k) in TDS-exchange reaction under various light intensities. The Rate study of i, j included three replicates for each group (n = 3). The data in b, d, f, and j are presented as mean values ± S.D.

Fig. 3: High-resolution photo-patterned formation within the hydrogel, induced by exposure to 445 nm light, showcasing the precise control over spatiotemporal scales at the micron level.
figure 3

a Spatial heterogeneity of ALYDS-hydrogel patterned by photomasks. b Fluorescence microscope images showcasing a pattern formed on the hydrogel surface through the thiol-ene reaction, utilizing a photomask and 30 min of light exposure. Scale bars represent 100 μm. c Stress-relaxation measurements of the ALYDS hydrogel were performed using atomic force microscopy (AFM). The hydrogel in illuminated region B relaxed faster than in non-illuminated region A. The inset (image) shows the τ’1/2 and 1-Fp/Fmax of the hydrogel. n = 7 per group from 3 independent hydrogels (dark, light). d Illustration of the ALYDS hydrogel’s stress relaxation rates under alternating light (5 mW/cm²) and dark conditions by rheology. The gray area indicates a resting period of 6000 s. e Graph depicting the cyclic stress relaxation behavior (τ1/2) of the ALYDS hydrogels under various conditions, as measured by rheology. Each cycle involved applying a 15% strain to the hydrogel for 3000 s at an intensity of 20 mW/cm², followed by a 6000-s recovery period in darkness. This process was repeated over five cycles. n = 3 per group from 3 independent hydrogels. The data (c, e) are present as mean values ± S.D.

Fig. 4: Opposite cell spreading responses to light-accelerated stress relaxation across diverse time ranges.
figure 4

a Representative images illustrating the spreading response of Hey cells on ALYDS hydrogel and glass substrates to variations in stress relaxation timescale. Scale bar: 20 μm. b Representative images illustrating Hey cells’ spreading response to variations in short timescale stress relaxation following light exposure on PBEDS hydrogel and CMCS-MA substrates. Scale bar: 20 μm. The immunostaining images of actin are highlighted in red and the nuclei (DAPI, 4,6-diamidino-2-phenylindole) in blue. The YAP/TAZ is green and the nuclei outline is sketched in the images. c Statistical analysis of Hey cells’ spreading area as depicted in a and b. Data analysis was performed using Kruskal–Wallis with Dunn’s multiple comparisons tests, comparing with the long-timescale stress relaxation of ALYDS hydrogel: *P = 0.01452, ****P < 0.0001; n = 124, 175, 180, 350 (0 mW /cm2, 20 mW /cm2 and 40 mW /cm2 and glass). Hey cells’s statistical analysis in the short-timescale PBEDS hydrogel was depicted in b: *P = 0.03753, ****P < 0.0001; n = 150, 300, 150, and 230 cells (0 mW /cm2, 20 mW /cm2 and 40 mW /cm2 and elastic). d Quantification of YAP nucleo-cytoplasmic (N/C) ratio of Hey cells as depicted in a and b. Data analysis was performed using Kruskal–Wallis with Dunn’s multiple comparisons test (**P = 0.00169, ****P < 0.0001; n = 350, 230 for glass, elastic; 140, 120, and 70 cells for 0 mW/cm², 20 mW/cm², and 40 mW/cm² for ALYDS hydrogel; n = 93, 172, 135 cells for 0 mW/cm², 20 mW/cm², and 40 mW/cm² for PBEDS hydrogel). The solid lines (black) in the scatter plots indicate median values. All studies included three independent hydrogels for each group.

Hydrogel creep testing24 was conducted to further assess the viscoelasticity properties. We measured shear strain under a 300 Pa stress while the light source was turned on for 1000 s at an intensity ranging from 0 to 40 mW/cm2. Similar to the findings in stress relaxation, we noted an increase in photo-induced creep with higher light intensity. To quantify this effect, we tracked creep compliance (J) over time (Fig. 2e) and calculated the average creep compliance rate (1/<η > ) for the ALYDS hydrogel25. Under light exposure, the ALYDS hydrogel exhibited significantly enhanced creep compliance compared to its performance under dark conditions. With increasing light intensity, the average creep rate increased from 0.037 MPa−1.s−1 to 0.11 MPa−1.s−1 (Fig. 2f).

The responsive stress relaxation and creep induced by visible light were attributed to an increased rate of disulfide metathesis reaction. To quantify the metathesis rate, a small molecule model reaction including tetramethylthiuram disulfide (TETD) and PBEDS, was used26 (Fig. 2g, see detailed in supporting information). The metathesis reaction between TETD and PBEDS was expected to generate 4-((diethylcarbamothioyl)disulfannecarbonothioyl)-1-(4-formylbenzyl)-1-methylpiperazin-1-ium (DDMI). HPLC analysis revealed that a molar ratio of [TETD]:[PBEDS]:[DDMI] = 3:3:8 was reached after 30 min (Fig. 2h), indicating that the complete scrambling of all three thiuram disulfides reached equilibrium. In contrast, the metathesis reaction proceeded slowly in a dark place, reaching equilibrium after 200 min (Supplementary Fig. 7). The metathesis rate constant (k2)27 was calculated to be 0.021 L·mol−1·s−1 at 0 mW/cm2 and increased to 0.35 L·mol−1·s−1 at 40 mW/cm2, as shown in (Fig. 2i). This significant enhancement of k2 under light illumination confirmed that the TDS moiety plays a pivotal role in visible light- accelerated stress relaxation28,29. Therefore, by manipulating various factors, such as the type of aldehyde groups, crosslinking density, polymer concentration, and light intensity, one can finely tune the physiological modulus and stress relaxation properties of the hydrogel. This method allows for the customization of hydrogel properties to meet the specific needs of the target tissue being examined30.

Spatial-temporal control of hydrogel stress relaxation via visible light activation

The spatial heterogeneity of hydrogel stress relaxation was accurately reproduced by controlling the TDS shuffling reactions with photopatterning31. To visualize the spatial resolution, ALYDS hydrogels were immersed in an alkene-containing fluorescent dye 2-Allyl-6-2-dimethylamino-ethyl-amino-1H-benzo[de]isoquinoline-1,3(2H)-dione (ADBD) solution (see supporting information for details) and then exposed to 445 nm light. The produced sulfur radicals on illuminated rectangular region B could react with ADBD through a thiol-ene click reaction, resulting in green fluorescence emission32 (Fig. 3a). Fluorescence microscopy revealed the distinct fluorescent (area B) and non-fluorescent regions (area A) within the hydrogel, disclosing a high pattern fidelity (Fig. 3b). This experiment provides evidence for achieving high spatial sub-cellular resolution in the light-accelerated TDS metathesis, with patterning precision reaching as fine as approximately 10 μm (Supplementary Fig. 8).

Next, atomic force microscopy (AFM) with a colloidal probe [66] was further employed to measure the in-situ stress relaxation and viscoelastic characteristics (see supporting information for details). To illuminate the hydrogel within the AFM setup, we employed a light source (5 mW/cm²) with a bandpass filter (488 nm) attached to the system. In this microscale measurement, a distinct difference in the stress relaxation (Fig. 3c) was observed between illuminated region B and non-illuminated region A, while their elastic modulus were almost the same (Supplementary Fig. 9). The light induces an increase of relaxation amplitude (1-Fp/Fmax)33,34 and a decrease of the half-life time (τ’1/2) to reach the relaxation plateau (Fp), demonstrating the visible light-activated viscoelastic heterogeneity.

Using light, we can also achieve precise and reversible temporal regulation of stress relaxation in hydrogels. This is possible due to the reversible changes in the metathesis reaction rate of TDS moieties in response to light exposure35. For example, upon 20 mW/cm2 lumination, the ALYDS-hydrogel exhibited fast stress relaxation with τ1/2 = 1500 ± 230 s, and τ1/2 = 3400 ± 410 s with the light switched off (Fig. 3d). This switching could be repeated up to 5 times (Fig. 3e). Notably, the ability for light-induced stress relaxation switching fully illustrates the temporal regulation.

Opposite cell spreading responses to light-induced stress relaxation across diverse time ranges

Research has shown inconsistent results on how cells spread in reaction to modified stress relaxation, possibly due to differences in the timescales of stress relaxation examined36. It’s important to note that tissue stress relaxation can differ among individuals and change with age37. In our study investigating cellular responses to light-induced stress relaxation across various timescales, we employed ALYDS and PBEDS hydrogel. These hydrogels exhibit distinct stress relaxation times, with ALYDS’s τ1/2 ranging from 3500 s to 1500 s, and PBEDS from 500 s to 100 s. We functionalized both hydrogels by incorporating the c(RGDfK) (Arg-Gly-Asp-D-Phe-Lys) cell adhesion peptide to facilitate cell experiments (Supplementary Fig. 10). Human ovarian cancer cells (Hey)38 were cultured on both c(RGDfK) functionalized hydrogels. We observed an increase in cell density as the RGD incubation concentration rose from 0 to 0.25 mg/mL (Supplementary Fig. 11). Consistent with previously published findings39, further augmentation of adhesion ligand quantities (up to 0.5 mg/ml) did not result in greater cell adhesion.

We further investigated the spreading behavior of HEY cells in response to the temporal control of stress relaxation in situ. On the ALYDS hydrogel, which exhibits a slower stress relaxation time of approximately 3400 s, cells showed extensive spreading (1300 ± 570 µm²). This degree of spreading was similar to that observed on glass substrates (Fig. 4a). Notably, this spreading significantly surpassed that on elastic substrates with an identical modulus (990 ± 250 µm²) (Fig. 4b, Supplementary Table 2). When exposed to light intensities of 20 and 40 mW/cm², the τ1/2 of the ALYDS hydrogel reduced to about 1800 and 1500 s, respectively. We selected a time scale of 30 min to align with both the cellular mechanosensitive response time and the rapid stress-relaxation time (1500 s)40. After 30 min of accelerated substrate stress relaxation, the cells quickly transitioned to smaller, more rounded shapes. The average cell area (Ã) decreased markedly from around 1300 µm² to 830 µm², as shown in Fig. 4c. In addition to changes in spreading area, the cells also rapidly evolved towards a more circular morphology in response to the faster relaxation of the substrates (Supplementary Fig. 12a). To rule out the interference from cellular response to visible light, similar experiments were performed with Hey cells on control hydrogels without light responsiveness (see supporting information for C3-ALY hydrogel preparation). In these cases, no differences were observed in cell morphology and spreading area under the aforementioned illumination conditions (Supplementary Fig. 13).

Furthermore, the nuclear localization of the YAP (yes-associated protein) transcriptional41 regulators was significantly influenced by the in situ modulation of stress relaxation. This is illustrated in Fig. 4a, b, where the YAP nuclear-to-cytosolic ratio diminished from 2.3 ± 0.53 to 1.4 ± 0.21 upon irradiation, indicating cellular remodeling in response to changes in the local micro-environment.

Subsequently, we explored the effect of in situ temporal control of stress relaxation on the PBEDS hydrogel. In contrast to the ALYDS hydrogel, the PBEDS hydrogel, characterized by a shorter τ1/2 of approximately 500 s, exhibited smaller cell morphologies (450 ± 170 µm², Fig. 4b, c), aligning with the findings previously reported42. These substrates undergo faster stress relaxation (200 s, 100 s) when exposed to visible light at 20 and 40 mW/cm². Contrary to expectations, we noted an enhancement in cell spreading, with measurements increasing to 520 ± 270 µm² and 640 ± 280 µm² under these conditions, accompanied by prolonged cell circularity (Supplementary Fig. 12b). Additionally, the YAP nuclear-to-cytosolic ratio exhibited an increase from 1.4 ± 0.62 to 2.2 ± 0.49 (Fig. 4d).

A comprehensive viability study evaluated the potential impact of TDS radicals, visible light exposure, and their combination. The study encompassed an assessment of the toxicity of cell proliferation (Supplementary Fig. 14a) and cell viability (Supplementary Fig. 14b, c). Subsequently, we employed immunostaining for Gamma-H2AX to assess DNA damage (refer to Supplementary Fig. 14d). Our experimental parameters did not reveal any adverse effects on cell behavior, indicating minimal cell damage during light exposure. Therefore, we conclude that observed alterations in cell areas result from temporal regulation in the viscoelastic properties of the hydrogel, rather than any toxic effects induced by light exposure43.

Our study demonstrates the complexity of cell interactions with temporal changes in situ substrate viscoelasticity (Fig. 1). It shows that substrates with slower stress relaxation times (e.g., 3400 s) promote cell adhesion and spreading. Longer relaxation periods can lead to higher integrin-ligand bond formation and increased cytoskeletal contraction44. Therefore, the shift to 1500 s stress relaxation times result in reduced spreading areas and decreased focal adhesion (Supplementary Fig. 15). In contrast, when stress relaxation occurs over markedly shorter timescales (from 500 to 100 s), cells were not spread out but were instead rounded. Despite this, cells slightly expand their spreading areas, indicating an adaption to the rapid environmental changes (Fig. 4d). We suggest that at notably short timescales, enhanced stress relaxation might result an increase in filopodia length, which may facilitate their migration and result in minor increases in spreading area42 (see Supplementary Fig. 16). These could include adjustments in cytoskeletal dynamics or the activation of mechanotransduction processes that differ from those triggered by slower stress relaxation44. Further investigation into cell behaviors on MDADS hydrogel revealed that the shift in relaxation time from 1500 s to 500 s in the intermediate timescale is insufficient to elicit a pronounced response (Supplementary Fig. 17). Specifically, changes in basal stress relaxation at this timescale neither facilitate sufficient energy dissipation to induce cell shrinkage nor prompt extracellular viscosity to elicit cell expansion. Our results highlight the intricate link between cell behavior and substrate mechanics, emphasizing the importance of further research in this area.

Cellular adaptation and mechanical memory in response to dynamic viscoelastic changes in the ECM

We further explored how cellular responses can be reversed in reaction to the dynamic viscoelastic alterations in the ALYDS hydrogel, given its significant impact on cell behavior (Fig. 5a). After exposing cells to light for 30 min; they were subsequently incubated in darkness for different durations: 1 h, 2 h, or 4 h. Notably, our observations revealed that cells slowly regained their spreading area and circularity on substrates after a 4-h incubation period. The time to attain a flattened morphology was longer than the duration needed for cells to round up (Fig. 5b, c). During this time, the YAP nuclear-to-cytosolic ratio also exhibited a recovery, shifting from 1.6 ± 0.40 to 1.90 ± 0.32 (Fig. 5d).

Fig. 5: Regulation of cellular behavior through reverse viscoelastic changes.
figure 5

a Representative images of Hey cells cultured on ALYDS gels, subjected to 20 mW/cm² light exposure for 0.5 h and rested for 0 h, 1 h, 2 h, and 4 h. Actin and nuclei are visualized as red and blue, respectively. Scale bar: 25 μm. Analysis of the spreading area b and circularity c of Hey cells on 2 kPa-viscoelastic substrates from a. ****P < 0.0001; **P = 0.0082, ***P = 0.00058. n = 124, 69, 145, 135, 150 cells from left to fight respectively. d Analysis of Hey cells’ YAP nuc/cyt ratio on 2 kPa-ALYDS hydrogels subjected to 20 mW/cm² light exposure for 0.5 h and rested for varying durations (0 h, 2 h, and 4 h). ns P > 0.05, ****P < 0.0001, *P = 0.03099; n = 71, 63, 70, 89 cells respectively. The solid lines (black) in the scatter plots indicate median values. All studies included three independent hydrogels for each group. All statistical analysis was conducted using Kruskal–Wallis with Dunn’s multiple comparisons test.

To enhance our understanding of how cyclic viscoelastic mechanics influence cell spreading, which has relevance in vivo45,46, we subjected the cells to alternating periods of darkness and light exposure over four cycles (Fig. 6a). During dark periods, cells consistently regained their spreading area after each cycle. Notably, starting from the third light exposure cycle, the cells’ spreading area reduction was less pronounced than in the first cycle. This indicates that cells can “remember” mechanical events experienced during viscoelastic changes by YAP/TAZ shutting at the cell-substrate interface. In alignment with this, an increase in YAP/TAZ localization was noted following the third cycle of light exposure, correlating with the observed changes in cellular spreading47 (Fig. 6b–d).

Fig. 6: Regulation of cellular behavior through cyclic viscoelastic changes.
figure 6

a Immunolocalization of YAP (green) and Actin (red) collected following each cycle of regulation under 20 mW/cm2 irradiation for 0.5 h, the nuclei outline (blue) is marked in the image. Scale bar: 100 μm. Quantification of cell spreading areas b and circularity c subjected to cyclic viscoelastic regulation alternating for 4 cycles between 0 mW/cm² for 4 hours and 20 mW/cm² light exposure for 0.5 h. n = 36, 68, 135, 102, 117, 157, 134, 144 cells from left to right. **P = 0.0019; *P = 0.013. d Quantification of the YAP nuclear/cytoplasmic ratio. Data were collected from over 60 cells from e in each group, ****P < 0.0001, *P = 0.043. n = 156, 178, 99, 210 cells from three independent hydrogels. e Hey cells were cultured on the slow-relaxing substrate (azure) for 1 to 7 days before being exposed to 20 mW/cm2 light, transitioning to fast-relaxing hydrogels (pink). Subsequently, Hey cells were cultured on fast-relaxing hydrogels for 0.5 h or 1 h before collection and analysis (gray). f Cell area response to in situ increasing viscoelastic relaxation (30 min) after different durations of mechanical dosing (1, 3, 5, and 7 days). n = 124, 173, 197, 202, 150 cells (no light, SR1, SR3, SR5, SR7) from three independent hydrogels. g YAP response to in situ viscoelastic changes after 7 days of mechanical dosing on SR-hydrogels. n = 87, 148, 103 (SR7-0 min, 30 min, 60 min) from three independent hydrogels. The solid lines (black) in the scatter plots indicate median values. All statistical analysis was conducted using Kruskal–Wallis with Dunn’s multiple comparisons test.

To further demonstrate our findings, we subjected Hey cells to mechanical dosing on a slow relaxing hydrogel (τ1/2 = 3400 s) for varying durations before inducing in situ mechanical changes with light, transitioning the hydrogel to a fast-relaxing state (τ1/2 = 1800 s) in the presence of cells. Initially, Hey cells were cultured on slow-relaxing hydrogels for one day before switching to the fast-relaxing state (Fig. 6e). After 30 min in the fast-relaxing state (SR1-FR30 min), the cell spreading area decreased from 1440 µm² to 637 µm². However, after 3 days on the slow-relaxing hydrogel, Hey cells began to show some memory behavior; the cell area was reduced to around 1040 µm² after illuminating (Fig. 6f). To increase the mechanical dose, Hey cells were cultured on slow-relaxation hydrogels for 5–7 days before the transition. In this case, a more persistent cell spreading was observed (SR5-FR30 min and SR7-FR30 min). The localization of YAP remained above basal levels up to 60 min (2.5 to 2.3) after light exposure (SR-7-FR 60 min and Supplementary Fig. 18). With 7 days of mechanical dosing, Hey cells demonstrated irreversible activation of YAP after 60 min of light exposure (Fig. 6g and Supplementary Fig. 19). This is reminiscent of the recently proposed concept of “mechanical memory”, which allows cells to remember the stiffness of hydrogel on which they had been previously seeded. Our findings raise the fascinating possibility that “mechanical memory” could also be stimulated by viscoelastic cues48. We propose that cells could responsively alter the localization of YAP/TAZ to adapt to dynamic viscoelastic changes in the extracellular matrix (ECM), suggesting a mechanism for cellular mechanical memory41,49.

Light-induced heterogeneous viscoelastic cues for guiding cell migration

Considering that substrate stress relaxation plays a crucial role in regulating cell spreading, we investigated the potential of light modulation to guide cellular movement50,51. Visible light was employed to permeate a photomask featuring a gradient in translucency, resulting in the creation of a linear gradient on the substrate above (Fig. 7a). To validate the feasibility of generating continuous gradients through our proposed methodology, the fluorophore ADBD solution was incubated with hydrogels exposed to light for 10 min using the gradient photomask. The outcome revealed a consistent gradient of fluorescence intensity along the X-axis (Fig. 7b, c), with minimal variation observed along the Y-axis after light exposure. AFM experiments further directly measure the spatially heterogeneous stress relaxation and viscoelastic characteristics at four different regions along the gradient (Supplementary Fig. 20a). As suggested by the fluorescent gradient, the relaxation amplitude and characteristic time change gradually (Supplementary Fig. 20b, c). The results illustrate that a continuous and precisely gradual gradient can be established along the X-axis of the hydrogel.

Fig. 7: Light-induced heterogeneous viscoelastic cues to regulate cell migration behavior.
figure 7

a Schematic depicting the procedure for creating a stress-relaxation gradient within the hydrogel. Measurement of fluorescent green intensity b along the gradient hydrogel, as achieved through the method in a. The resulting fluorescence intensity is graphically represented against the length of the gel c. Scale bar = 1 mm. d Tracking of trajectories for approximately 120 randomly chosen migrating cells under each experimental condition. e Analysis of x-displacement over a period of 150 min at 5-min intervals, observed in cells on various gradient hydrogels. f Calculation of the Steady-Wandering (SW) index for cells on gradient substrates after 150 min. Data represents n = 325 cells for 5 mW/cm², n = 342 cells for 2 mW/cm², and n = 352 cells for 0.8 mW/cm², collected from three independent experiments. The SW index is defined as (slow-fast)/(slow + fast), where it indicates the proportion of cells migrating towards either the slow or fast relaxation region of the gradient. Kruskal–Wallis with Dunn’s multiple comparisons test was used for analysis, *P = 0.037. The black line in the box plot represents the median. g Time-lapse images of Hey cells migration in response to 488-nm-light stimulation. The yellow dashed circles represent the region of light illumination. Scale bar: 10 μm. h Cell migration distance as a function of time (15 min) after light stimulation for n = 9 cells.

To investigate whether the gradient of stress relaxation induced the directed migration of cancer cells, we monitored the movement of Hey cells on the substrates. The cell movements were captured through time-lapse microscopy over 150 min at 5-min intervals. The recorded videos were analyzed using the “manual tracking” plugin in the Image J software52. Three distinct gradient strengths were achieved by utilizing light with intensities of 5 mW/cm2, and 2 mW/cm2, 0.8 mW/cm2. Figure 7d depicts representative cell trajectories. Moreover, at median viscoelastic gradients (3400 s-2400 s, 3400 s-2600 s), a notable inclination of cell migration was observed towards the left, corresponding to the direction of slower relaxation (Fig. 7e). As the gradient decreases (3400 s-2900 s), the tendency for cell migration towards the left diminishes. We use SW values to determine the proportion of cells that migrate in both directions (Fig. 7f). At the largest migration gradient (5 mW/cm2), an impressive 70% of the cells exhibit migration towards areas of slower stress relaxation. This gradient corresponds to 15 Pa loss-modulus/mm, as measured by rheology (Supplementary Fig. 21). We also tested a viscoelastic gradient at higher light intensities (10 mW/cm2), however, the rapid cell shrinkage observed at this intensity prevented the cells from exhibiting a stronger migratory tendency (Supplementary Fig. 22). To eliminate the possibility of interference from adaptive cellular protrusions due to light irradiation, comparative experiments were conducted. These experiments involved Hey cells placed on ALYDS hydrogels under a uniform light intensity of 5 mW/cm2 without a gradient, and C3-ALY hydrogels under the condition of highest gradient strength (Supplementary Fig. 23). In these experiments, no instances of directional migration were observed. These findings confirmed that the observed cell migration behavior was primarily attributed to differences in the viscoelastic properties of the substrate.

Using a confocal laser spot, we achieved in situ control of single-cell migration with high spatial precision. Hey cells were stained with SPY555-Actin for visualization53, as shown in Fig. 7g. Initially, after 5 min, a decrease in cell spreading within the illuminated area was observed. The Hey cells tended to migrate away from the light spot, moving towards areas with slower stress relaxation (Supplementary Movie 1). As the experiment progressed, the cells migrated, seemingly to minimize their overlap with the mechanically actuated region. We then strategically repositioned the illumination area to ensure that at least part of the cell remained exposed to the mechanical stimulus. This approach allowed us to guide the cell mechanically across the field of view. The average speed of cell migration was recorded at 0.43 μm/min, detailed in Fig. 6h. Notably, when photo-illumination was confined to a single cellular protrusion, we observed a retraction of cellular protrusions in response to the photo-induced changes in viscoelasticity, captured with high spatial resolution (Supplementary Fig. 24).

This observed behavior is qualitatively similar to durotaxis54, where cells migrate in response to defined stiffness gradients55. In such scenarios, cells react to the tension created by actin fibers, leading to a traction gradient that guides their migration direction56. This similarity highlights the significance of viscoelastic changes in influencing cellular migration. Our findings specifically suggest that Hey cells, characterized by their rapid metastatic nature and relatively low adhesion strength, tend to migrate towards areas where they can exert greater myosin expression. (as shown in Supplementary Fig. 25)57,58. This tendency could potentially enhance their metastatic capabilities. Furthermore, these results, combined with the methodologies used, pave the way for a more detailed investigation into how tissues’ heterogeneous viscoelastic cues impact cancer cell migration.

Discussion

We have successfully demonstrated a strategy for achieving visible-light-activated spatial-temporal control of hydrogel stress relaxation and viscoelastic properties. This approach incorporates the TDS moiety with visible light-responsive metathesis reaction into the hydrogel, enabling network rearrangement in response to light exposure. The light-regulated viscoelastic properties of our hydrogel are characterized by their low toxicity, spatial controllability, dose-dependency, reversibility, and adaptability at various stages of cell culture. This hydrogel platform is exceptionally versatile, enabling exploration of both short- and long-term viscoelastic heterogeneities and their effects on cell behavior, including the observation of opposing spreading responses. Our findings indicate that cells can “remember” mechanical events experienced during changes in viscoelasticity, as evidenced by the regulation of YAP localization. Our research proposes that such “mechanical memory” might be activated by viscoelastic stimuli in an environment maintaining a constant stiffness. Furthermore, we employed light regulation by photopatterning gradient substrates to guide cell migration direction. Insights gained from light-regulated cell migration studies could contribute to developing targeted therapies to inhibit or redirect cancer cell migration. In summary, our hydrogel platform stands out as a powerful tool for probing the intricacies of mechanotransduction in cellular processes across various timescales, all influenced by viscoelastic heterogeneities. This platform not only enhances our understanding of dynamic biomechanical processes but also opens avenues for research and therapeutic interventions in the realm of cancer biology and beyond.

Methods

Fabrication of the hydrogel platform

Round glass coverslips (No.1, Ø14 mm, CITOGLAS) underwent a cleaning process that involved sequential sonication in methylene chloride, ethanol, Milli-Q water, and ethanol again, each for 5 min. After drying under a stream of nitrogen, the coverslips were treated in an air plasma chamber at 0.3 bar for 15 min. The activated glass substrates were then immersed overnight in a 5 wt% solution of APTES in ethanol at room temperature. Subsequently, the glass was washed with dichloromethane (DCM) and dried with ethanol three times. Finally, the NH2-functionalized glasses were baked in an oven at 80 °C for 1 h.

A 7 wt% carboxymethyl chitosan solution was heated to 50 °C. Subsequently, a solution of dual dynamic crosslinker (ALYDS/MDADS/PBEDS/C3-ALY) in DMSO (50 wt%) was mixed into PBS (pH 7.4) to create solutions of 1.5, 2, and 3 wt%. This solution was then combined with the 7 wt% carboxymethyl chitosan solution to form a hydrogel precursor solution. This precursor solution was applied to NH2-functionalized coverslips and covered with a superhydrophobic microscope slide. To sterilize, the gels were exposed to 70% ethanol for 10 min and then rinsed twice.

The (disulfanne−1,2-dicarbonothioyl) diproline (PRODS) hydrogel served as a control to evaluate the impact of the TDS moiety on the stress-relaxation times in the absence of Schiff base bonds under dark conditions. To prepare the PRODS precursor solution, PRODS (3 wt%) was combined with EDCI/NHS (6 mg/ml, 19 mg/ml) in DMSO. Following the activation of this mixture, it was incorporated into the CMCS solution (7 wt%) to create the PRODS hydrogel.

The elastic hydrogel platform was fabricated by pouring 2.5 wt% CMCS-MA solutions and 0.05 wt% I2959 solution into NH2-functionalized coverslips. It was then irradiated from one side for 300 s using a UV lamp curing light with an intensity of 20 mW/cm² at 365 nm, resulting in the production of a 2 kPa elastic hydrogel as the control group (refer to Supplementary Table 3).

Mechanical characterization for hydrogel

Oscillatory experiments were conducted using a rheometer (DHR, TA instruments) equipped with a 5 mm steel plate geometry and a Peltier heated plate in a frequency-controlled, amplitude-controlled, or time-controlled mode. TA strain sweeps with the oscillation frequency of 1 rad/s were conducted at a strain range of 0.01–100% to determine the linear region. After determining the linear viscoelastic region, the tested samples were subjected to a frequency sweep from 0.01 to 10 Hz. Mineral oil was applied to the hydrogel-air-instrument interface to prevent evaporative artifacts. Gelation was monitored by time sweep at 1 rad s–1, 1% strain, and 25 °C. In the stress relaxation experiments, a shear strain (γ) of 15% was applied, and the corresponding shear stress (σ) was monitored over time. Concurrently, visible light was provided using an OmniCure model equipped with a 400–500 nm filter during the stress relaxation test. Prior to initiating the test, the gels were given a 10-min equilibration period. In the creep experiments, a constant stress of 300 Pa was applied, and the creep compliance (J) was recorded over time. The rate of creep was determined using Eq. (1)25.

$$J-{J}_{0}=t/ < \eta > $$
(1)

Stress relaxation cycles involved exposing the gels to visible light with intensities of 20 mW/cm², emitted by an OmniCure light source. The gels were subjected to alternating light and dark conditions, consistently maintained at a frequency of 1 rad/s and a strain of 15%. Each cycle lasted for 3000 s and was followed by a 6000-s relaxation phase, during which the hydrogel was allowed to relax without being subjected to any shear force. All of the rheology data were analyzed using ORIGIN software.

Cell culture and reagents

Human ovarian cancer cells (Heys, Gaofeng Fan’s group, SLST ShanghaiTech) were cultured in high-glucose Dulbecco’s modified Eagle medium (DMEM; Gibco) supplemented with 10% fetal bovine serum and 1% penicillin/streptomycin. Heys cells were cultured in a standard humidified incubator at 37 °C in a 5% CO2 atmosphere. T. The cells were seeded on the hydrogels at a density of 10,000 cells/cm2.

In-situ viscoelastic manipulation with visible light

After a 24-hour culture period in the viscoelastic hydrogel, the cells with different hydrogel samples were transferred to the live-cell imaging chamber, maintained at 5% CO2, and equilibrated for 5 min. Subsequently, the cells were irradiated with 445 nm blue light for a specified duration in a controlled manner.

Immunofluorescence staining for fixed cells

All immunofluorescence staining associated with light experiments was performed immediately after illumination. For circulatory cell experiments, cell fixation occurs after the cells have been subjected to corresponding dark (4 h) or light (0.5 h) alternations.

For the immunostaining, 4 wt% paraformaldehyde was used to fix cells at room temperature for 30 min. The gel was washed three times by PBS. Permeabilization was then added to the platform (0.5 wt% Triton X−100) at room temperature for 10 min. The hydrogel was then incubated with 5 wt% BSA as a blocking solution for 1 h at room temperature to minimize non-specific staining. The primary antibody (diluted in 1 wt% BSA) was added and incubated at 4 °C overnight. Following the primary antibody incubation, a secondary antibody was applied for 60 min. Subsequently, samples were washed twice with PBST (Phosphate-buffered saline with Tween-20) and three times with PBS. Subsequently, Alexa Fluor 633 phalloidin (Zenbio) was used to label actin (1:200), and DAPI (BBI, E607303-0002) was used to label the nuclei (1:500).

For immunofluorescence imaging, the gels were turned upside down to optimize the staining visibility. Images were then captured using a confocal microscope (Olympus Corporation) equipped with a 20 X objective.

Primary antibodies used were as follows: anti-paxillin antibody Y113 (1:500, Abcam ab32084), anti-non-muscle Myosin IIB (1:200, Abcam ab230823), anti-YAP/TAZ (1:250, Zenbio), anti-gamma H2Ax (1:200, MedChemExpress HY-P80161). Matching secondary antibodies (1:500, 550037) were purchased from Zenbio.

YAP /TAZ localization analysis

The YAP Nuclear/Cytoplasmic ratio was determined through ImageJ analysis. To briefly explain the process, a nuclear mask was generated to quantify YAP nuclear intensity. The cytoplasmic region was defined using the red actin channel (633 nm), and the DAPI channel area was subtracted from the green YAP channel (488 nm) image to calculate the average grayscale signal of the cytoplasm. Subsequently, the fluorescence intensity ratio was computed by dividing the average grayscale values of the nucleus and cytoplasm (Eq. (2)).

$$N/C=\frac{{{{\rm{I}}}}_{{nuc}}/{A}_{{nuc}}}{({I}_{{cell}}-{I}_{{nuc}})/({A}_{{cell}}-{A}_{{nuc}})}$$
(2)

Inuc and Icell are the total intensities of the YAP signal inside the nucleus and cell, respectively, Anuc is the area of the nucleus as measured by DAPI staining, Acell is the overall area of the cell as delineated by F-actin staining, respectively. Intensities and areas were measured using Image J from the fixed immunostaining pictures.

Live cell imaging and analysis

For photo-induced viscoelasticity, Heys were grown on ALYDS hydrogel for 24 h, gently washed with PBS, and transferred to a glass bottom 24-well plate, upright, with fresh imaging medium.

Live cells were imaged on a confocal microscope (Olympus Corporation) equipped with a 20 X objective and an environmental chamber maintained at 37 °C and 5% CO2. For local photo-induced viscoelasticity, Water-soluble F-actin dyes were added to gels for 24 h with a fresh imaging medium. Viscoelasticity was induced during imaging with the 445 nm laser in software. In a user-defined region, the gels were exposed to 445 nm light exposure, and then an image of the actin cytoskeleton was acquired by a 560 nm channel. Image analysis was performed in FIJI. Imaging was started 24 h after seeding, Migration tracks from individual cells were analyzed with Trackmate of FIJI.

Atomic force microscopy (AFM) measurements

Force-indentation and stress relaxation measurements for hydrogels are performed by using an AFM (MFP-3D, Asylum Research) with a colloidal probe59,60. The AFM is set up on an inverted microscope (IX71, Olympus) equipped with an EMCCD camera (Ixon3, Andor) and a light source (X-cite, 120Q). The colloidal probe consists of a glass sphere of radius R (~15 µm), which is glued on the front end of a rectangular cantilever beam (NSC36/Pt, MikroMasch) featuring a spring constant of 0.6 N/m. The colloidal probe is coated with a thin layer of poly(L-lysine)-graft-poly (ethylene glycol) (PLL-gPEG), which effectively reduces the adhesion of the hydrogel surface to the probe. The AFM measurements were carried out in contact mode. The measured force–distance curves were recorded with a constant speed v = 100 μm/s and fitted with the Hertz model to calculate the reduced Young’s modulus. The stress relaxation curves were measured by quickly applying a constant indentation to the hydrogel using a colloid probe at a loading speed of v = 100 μm/s. The AFM recorded the force relaxation F(t) while maintaining the constant indentation. All experiments were carried out at room temperature (25 °C).

Anisotropy analysis

To quantify the anisotropy of Myosin, small regions of interest containing 6 cells were chosen from the immunostaining pictures. Anisotropy was then calculated at the level of the adhesive. For this, we used FibrilTool61, an ImageJ plugin developed to quantify the polarization of the Myosin-IIB structures in microscopy images.

Statistical analysis

Statistical analysis was conducted using Origin software. The data is expressed as mean ± standard deviation unless otherwise specified. Sample sizes are provided in figure captions, but typically, experiments were conducted with a minimum of n = 3 for each condition. Error bars represent the standard deviation. Data was analyzed using a one-way Kruskal–Wallis test followed by Dunn’s multiple comparisons tests for all the cell experiments. Statistically significant differences were defined as at p < 0.05, 0.01, and 0.001, 0.0001 by *, **, and ***, **** respectively. In a box plot, the gray lines represent the distribution of the data, with the maximum, 75%, 25%, and minimum values from the top. The black line is the median. Precise P values for all cell experiments are summarized in Supplementary Tables 5 and 6. Precise P values for supplementary experiments are summarized in Supplementary Table 7. All experiments were repeated at least three times.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.