SAN FRANCISCO — Traffic is light. Subway cars are carrying about three-quarters their usual payload. And Salesforce Tower, the second tallest building west of the Mississippi, is largely empty.

The Bay Area, known for being ahead of the curve on technology and a hub of political and consumer trends, had earned a less desired distinction this month. Remote work in response to the coronavirus is being applied more broadly than anywhere else in the nation, a potential preview of what’s to come for other major cities. Bans on large gatherings starting this week are affecting millions of people. The hustle of Silicon Valley has slowed to a crawl.

San Francisco resident Trevor Tillman said the city felt as empty as Christmas Eve when he left his office Tuesday evening. His daily commute on the public transit BART trains to the financial district, where he works as a video producer at beauty brand Kendo, has been equally surreal.

“On one level, it’s nice not boarding into a mosh pit, but there’s also some underlying anxiety about why it’s like that,” Tillman said.

The Bay Area is home to more than 7 million people and some of the world’s most valuable companies including Apple, Google and Facebook. Its economic output is critical to the overall U.S. economy.

But it was also one of the first regions in the U.S. to record the spread of the coronavirus through community transmission, prompting health officials two weeks ago to warn residents that action would be required to slow its advance.

Now, travel plans and appointments are constantly in flux, as people err on the side of cancellation. In the last week, hundreds of thousands of employees from companies including Apple, Facebook, Twitter, Google, Lyft, Intel, LinkedIn, Microsoft, and HP have been told they could work from home.

Scott Wiener, a state senator representing San Francisco, said restaurant and bar owners whose businesses “have tanked” are talking about shutting down their businesses.

“People are heeding public health warnings and that’s good, but we’re going to pay a huge price economically for this outbreak,” he said. “We’re going to have some real work to do to rebuild.”

San Francisco has implemented a ban on nonessential public gatherings at city-owned facilities, such as auditoriums, convention centers, theaters, libraries and piers. Nearby Santa Clara County, which houses the headquarters of tech giants including Apple and Google, banned gatherings over 1,000 people starting at midnight Tuesday, disrupting home games of the National Hockey League’s San Jose Sharks.

The Transportation Security Administration early Wednesday confirmed three officers who worked at the San Jose airport tested positive for covid-19 and that personnel who had come into contact with them were sent home for two weeks.

Across the bay in Oakland, Mayor Libby Schaaf (D) said in an interview that the Alameda County Public Health Department has also been in talks on whether to prohibit such gatherings and the city is even exploring a moratorium on rental property evictions.

“That’s a small price to pay for the public good,” she added, of refraining from public entertainment events.

Meanwhile, a massive cruise ship stood nearby as a floating landmark to the Bay Area’s current condition. The Grand Princess, which still houses roughly 1,000 crew members under quarantine, has temporarily moored in Oakland and become a curiosity of train commuters who have taken to photographing it for social media as they whiz by.

Already, the West Coast has reported more than 300 cases. The Seattle region has been hardest hit by deaths from the coronavirus, largely fueled by outbreaks in area nursing homes.

Around Seattle, local agencies such as the Public Library were limiting activities, public pools were closing and officials were taking measures to slow the spread of the illness. The government was expected to make a sweeping announcement Wednesday, while the Associated Press reported that the governor was expected to ban public gatherings above 250 people.

The uneven spread of coronavirus has resulted in varied measures to contain it, including encouraging social distancing to limit human contact, school and office closures and large group gathering limitations. New Rochelle, N.Y., on Tuesday was the first U.S. city to quarantine a geographic containment zone of about a mile in an effort to limit the spread of the disease.

The U.S. West Coast is slowly following in the footsteps of other global hubs, as covid-19 has spread to infect over 100,000 worldwide, prompting more than 4,000 deaths. The Chinese government took drastic steps to limit movement in the epicenter, Wuhan, while the Italian government recently implemented a similar travel and movement ban for its citizens.

The first reported case of community spread in the country occurred in Solano County near Sacramento in mid-February. Travis Air Force Base hosted quarantined U.S. citizens from a cruise ship and China. It’s still unclear how a resident who did not have contact with family or friends who traveled to the affected regions came down with the virus.

Just days later, another such case was reported in Santa Clara County, preceding some of the country’s first school closures.

But the work-from-home orders, which Twitter was the first to implement last week, changed the rhythm of life here. The trains run by Caltrain that take people back and forth between Silicon Valley and San Francisco, were noticeably lighter on Monday and Tuesday, with unfilled seats during rush hour on what are usually standing-room-only commutes. “Our on-board staff are observing fewer people traveling on our trains during peak commutes,” said Alex Eisenhart, spokesperson for Caltrain.

The San Francisco Bay Ferry’s passengers dropped 20 percent Monday, compared with a week ago. BART reported that Monday ridership dropped by 25 percent compared with a Monday last month.

Meanwhile, Inrix, a traffic monitoring firm, said San Francisco’s road traffic began to drop last week and Google Maps showed green roads throughout the area even edging into rush hour. Morning Dumbarton Bridge traffic to Silicon Valley also dropped nearly 20 percent week over week, according to the Bay Area Toll Authority, while carpools over the Bay Bridge dropped nearly 12 percent.

Lower traffic and train ridership resulted in fewer people. Some streets were largely deserted of pedestrians, while some typically packed downtown lunch spots lacked lines.

That’s true at Laurie Thomas’s restaurants, Rose’s Cafe and Terzo, where sales were down 40 percent and 50 percent Tuesday night. Thomas, who is also executive director of the Golden Gate Restaurant Association, said it’s been brutal since the city declared a state of emergency two weeks ago.

“The tech pullback has just exasperated the ghost town that is San Francisco right now,” she added.

Adam Metz noticed traffic from East Bay suburb El Cerrito to San Francisco was lighter on Monday as he crossed the Bay Bridge.

“It was oddly light. I thought something was a little bit weird there,” said Metz, a director of product in the city. “It felt like a Friday morning on a Monday.”

But the real shock was showing up to his empty office. The tech company where he just started work had announced that all employees had to work from home to decrease the spread of coronavirus, but Metz wasn’t on the email list yet.

James Pace-Cornsilk and Reed Albergotti contributed to this report.