Imagine a shirt that could patch itself when it rips, shed stains without a washing machine, and return entirely to the earth when you finally throw it away. Scientists in Shenzhen, China, have moved that idea closer to reality by growing fabric from a living fungus — and it does all three.

Researchers at the Shenzhen Institutes of Advanced Technology started with Cordyceps militaris, a medicinal fungus already used in traditional Chinese medicine. In nature, this fungus grows thin threadlike filaments called hyphae that tangle together into dense, tough networks. The team cultivated the fungus into small pellets, pressed those into flexible sheets, and added glycerol to make the material soft enough to wear.

The resulting fabric surprised them with what it could do. When damaged, pressing fresh fungal pellets onto the tear allowed new fibers to regrow and seal the gap. The material also cleaned itself under sunlight, breaking down stains through natural biological processes. And when discarded, it fully biodegraded in just 41 days in environmental testing.

"A living textile does not mean that the dress is constantly growing during normal use," said Li Ke, the paper's first author. Under dry conditions with little nourishment available, the biological activity simply stops. The fabric behaves like ordinary material during everyday wear.

The team found they could also add other microorganisms to the fungal base to give it new abilities — a kind of biological upgrade system. They demonstrated this by incorporating an engineered yeast that sticks to the fungal cell walls to introduce color, and a different fungus called Aspergillus niger that produces a dark pigment for UV protection. The researchers call it a "plug-and-play platform," meaning different organisms can be layered in to add features without rebuilding the fabric from scratch.

The researchers built a prototype dress to show what the material looks like in real clothing. But Li was careful not to oversell the current state of the technology. The culture medium — the nutrients that feed the fungus — makes up more than 95 percent of production costs. Before any commercial product could exist, the team needs to find cheaper nutrient sources and improve how they grow the fungus at larger scales.

The near-term vision is modest: short-run fashion pieces, exhibition clothing, art installations, or biodegradable packaging. These uses don't require the fabric to survive years of washing. "The broader concept could extend beyond clothing wherever a biodegradable structure with locally programmable biological functions is useful," Li said.

Looking further ahead, the team hopes to engineer the fungus itself to produce its own colors and protective molecules, eliminating the need to add other organisms. Li envisions eventually being able to activate biological functions only at specific locations, times, or under certain conditions — essentially giving the fabric a kind of built-in biological programming.

For a fashion industry searching for alternatives to petroleum-based synthetic fabrics and resource-intensive cotton, the work points toward a future where the clothes on your back might one day be as alive as the ecosystem they return to.