HOUSTON — There was no question on primary night in Texas last month that Franklin Bynum would win the Democratic nomination to become a criminal court judge in Houston. The 34-year-old defense attorney had no challengers.

But for his supporters who packed into a Mexican restaurant that evening, there was still something impressive to celebrate. Many in the crowd were members of the Democratic Socialists of America, or D.S.A., a group that has experienced an enormous surge of interest since the election of President Trump, even in conservative states. And Mr. Bynum was one of their own — a socialist who, along with at least 16 others, appeared on the ballot in primary races across the state of Texas.

“Yes, I’m running as a socialist,” Mr. Bynum said. “I’m a far-left candidate. What I’m trying to do is be a Democrat who actually stands for something, and tells people, ‘Here’s how we are going to materially improve conditions in your life.’”

Rather than shy away from being called a socialist, a word conservatives have long wielded as a slur, candidates like Mr. Bynum are embracing the label. He is among dozens of D.S.A. members running in this fall’s midterms for offices across the country at nearly every level. In Hawaii, Kaniela Ing, a state representative, is running for Congress. Gayle McLaughlin, a former mayor of Richmond, Calif., is running to be the state’s lieutenant governor. In Tennessee, Dennis Prater, an adjunct professor at East Tennessee State University, is running to be a county commissioner.