By Lindsay Dunsmuir and Doina Chiacu

WASHINGTON (Reuters) - Fresh off a defeat on U.S. healthcare legislation, the White House warned rebellious conservative lawmakers that they should get behind President Donald Trump's agenda or he may bypass them on future legislative fights, including tax reform.

The threat by White House chief of staff Reince Priebus to build a broad coalition on tax reform that could include moderate Democrats came as the Republican head of the tax-writing committee in the House of Representatives said he hoped to move a tax bill through his panel this spring.

House Ways and Means Committee Chairman Kevin Brady said his committee had been working on tax reform in parallel with the failed healthcare reform push.

"We've never stopped working," Brady told Fox News's "Sunday Morning Futures with Maria Bartiromo.

"We will continue to make improvements. We are planning to move this in the Ways and Means committee in spring ... and have this ready for the Senate to go as well," Brady said.

Both Trump and Priebus have scolded hardline conservatives who rejected legislation backed by the White House to overhaul Obamacare.

Speaking on "Fox News Sunday," Priebus held out the possibility of working with moderate Democrats as well as Republicans to pass other aspects of Trump's agenda, such as his proposed budget, the revamp of the tax code and a renewed effort at healthcare reform.

"If we can come up with a bill that accomplishes the goals of the president with Republicans alone, we'll take it and we'll move forward with it," Priebus said.

But he added: "I think it's more or less a warning shot that we're willing to talk to anyone. We always have been and I think more so now than ever."

In an embarrassment for Trump, who had campaigned for the White House on what he said were his skills as a dealmaker, the healthcare bill was pulled on Friday from the floor of the House of Representatives because it failed to draw enough support from within Trump's own Republican Party.

Story continues

Objections from members of the conservative House Freedom Caucus and from moderate Republicans left leaders short of the votes needed for passage, with Democrats unified in opposition.

Trump failed to win over the Freedom Caucus lawmakers despite courting them intensively. Outside conservative groups such as the Club for Growth and Heritage Action for America that are closely aligned with the Freedom Caucus had strongly opposed the Republican healthcare bill and urged lawmakers to vote against it.

In a tweet on Sunday morning, Trump lashed out at both the Freedom Caucus and the conservative groups, saying their actions had left "Democrats smiling in D.C."

Priebus said it was a "real shame" that conservative lawmakers decided not to get behind the healthcare bill.

"And I think the president is disappointed in the number of people he thought were loyal to him that weren't," he said.

Trump has put tax reform at the top of his legislative agenda now that the healthcare bill has failed.

Priebus said Trump was not backing off his view that the tax reform bill needed a border tax. He also said that the measure would include a middle class tax cut that he said might help to attract votes from moderate Democrats.

Senate Democratic leader Chuck Schumer criticized Trump over his handling of the healthcare bill and said Republicans would face the same conservative revolt on other issues.

"They're going to repeat the same mistake they made on Trumpcare with tax reform," Schumer told ABC.

He urged Trump to go a different path: reject the Freedom Caucus and work with Democrats.

"If he changes, he could have a different presidency," Schumer said. "He's going to have to tell them he can't work with them and we'll certainly look at his proposals. But it's going to be guided on our values."

Republican Representative Mark Meadows, chairman of the Freedom Caucus, said on Sunday he was optimistic on tax reform.

"I fully expect that what we're going to see is not only real tax reform, but other measures that come along," he told ABC.

Meadows, a fiscal conservative, also said his group could support a tax plan that is not revenue neutral.

"So, tax reform and lowering taxes, you know, will create and generate more income," Meadows said. "And so we're looking at those, where the fine balance is. But does it have to be fully offset? My personal response is no."

(Reporting By Caren Bohan; Editing by Nick Zieminski)