As Bay Area communities struggle to safely shelter their unhoused residents during a global pandemic, many have reached the same conclusion: Sometimes, smaller is better.

With homelessness soaring, shelters that can protect residents from COVID-19 need to be built as quickly as possible. Cities and counties around the Bay Area are experimenting with tiny, modular apartments —  a major departure from traditional, dormitory-style homeless shelters.

“This is kind of a wave of the future,” said Bruce Ives, CEO of LifeMoves, which is helping set up a modular shelter site in Mountain View. “I think this is going to be a growing asset for us in the fight against homelessness.”

Even without the threat of a deadly virus, traditional dorm-style shelters can be traumatic and dangerous, activists say. Dozens or hundreds of people — many of whom struggle with addiction and mental illness — are grouped together, and there’s nowhere for residents to safely store belongings.

On Sunday, a man stabbed five people at Grace Baptist Church in San Jose, which operates a shelter where several dozen homeless guests sleep together in one room. Two people were killed.

Backed in many cases by federal and state pandemic funding, and expedited by new legislation, modular shelters are in the works in cities from San Jose to Berkeley. At about 100 square feet per unit, each provides residents with their own room and locking door — though they vary widely in other comforts. The idea is for residents to live there until they find permanent housing, which could take several months.

So far, the modular shelters coming to the Bay Area are small-scale pilot programs, which officials intend to expand if they’re successful. There’s no telling how much, if any, funding will be left to continue those efforts once the pandemic eases. But advocates are hopeful this marks a shift toward a widespread and permanent alternative to traditional homeless shelters.

“We know that people do need their own safe spaces, so I think everyone in their design of temporary interim housing options is going to be taking that into account going forward,” said Ray Bramson, chief operating officer for Destination: Home. “We know we can’t overcrowd people in bunk beds in buildings. It just won’t work.”

Homeless services provider LifeMoves is working to open modular units for at least 124 people in Mountain View by the end of January. The state provided about $12 million for the site through its pandemic Project Homekey grant, and the city, county and LifeMoves will chip in additional funding.

The majority of the units will be made in the San Bernadino factory of Connect Homes, a pre-fab home company that began producing shelter modules when the pandemic hit. Since then, interest in its shelter alternative has been growing, said co-founder Gordon Scott. Connect Homes is in talks with San Mateo County to set up modules in Redwood City for between 130 and 250 people, and has had preliminary meetings with nearly 20 other cities and counties throughout the state, including Oakland, San Leandro and Contra Costa County, Scott said.

“Everybody is just looking for solutions to this problem,” he said.

Another brand that has seen demand soar during the pandemic is Washington-based Pallet Shelters. The company makes pre-fab shelters that are delivered disassembled on pallets and then quickly snapped together onsite, Ikea-style. The units, more rudimentary than some of the other modular models, are basically one step up from a tent.

Santa Clara County plans to set up 25 pallet shelters as interim housing for families near the old San Jose City Hall annex on First Street. Plans for the shelters, which are expected to open mid-December, were hatched pre-pandemic, but ended up being ideal for preventing the spread of COVID-19, said Hilary Barroga, a program manager in the county’s Office of Supportive Housing.

The Board of Supervisors budgeted $4.5 million to buy, install and run the pallet shelters as a two-year pilot program. If it’s effective, Barroga says the county may set up more modular shelters.

Oakland was a ring-leader in this movement, opening its first cabin community — a group of garden sheds outfitted with camping cots — to homeless residents in 2017.

San Jose opened its first Bridge Housing Community — 40 tiny homes — on Mabury Road at the beginning of the year.

When the pandemic hit, San Jose used federal funding to set up three “emergency interim housing” sites with modular units.

The first, on Monterey Road, took just four months to open after Gov. Gavin Newsom eliminated some red tape for the construction of emergency homeless housing during the pandemic. It cost about $125,000 per apartment.

Now, the city is working on a fourth site, and San Jose Mayor Sam Liccardo hopes there will be more. His dream is to stack modular units on top of each other, creating denser, multi-story shelters where residents still have private rooms. But the rules that greased the path for the city’s existing modular units will expire when the pandemic ends.

“We really hope there is a significant shift at a statewide level in legislation that enables us to do this at a greater scale,” Liccardo said. “Because we’re showing how it can happen if we’re able to focus our resources and have the political will to get the barriers out of the way.”