China will "take necessary measures" if the United States harms the country's economic interests, a Chinese official said Sunday, as President Donald Trump plans to impose tariffs on steel and aluminium.

"China doesn't want a trade war with the United States," Zhang Yesui, spokesman for the National People's Congress, told a news conference on the eve of the rubber-stamp parliament's annual session.

"But if the US takes actions that hurt Chinese interests, China will not sit idly by and will take necessary measures," Zhang said in China's strongest reaction yet since Trump announced the levies on Friday.

President Xi Jinping's top economic aide, Liu He, met with US officials at the White House this week to discuss the fraught economic relationship.

Trump's announcement has sparked a flurry of counter threats from other nations, sparking fears that it will trigger a tit-for-tat trade conflict around the globe.

Trump has shrugged off the threat, boasting on Friday that "trade wars are good, and easy to win".

China has been in Trump's crosshairs over its trade practices since his presidential campaign, but its steel and aluminium exports to the United States are minimal.

While China is the world's largest steel producer, it accounts for less than one percent of US imports and sells only 10 percent of its wrought aluminium abroad.

Steel producers in Canada, Brazil, Mexico, South Korea and Turkey rely far more heavily on the US market.

"The American action to put sanctions on other countries' reasonable steel and aluminium exports in the name of harming national security is groundless," Chinese Foreign Minister Wang Yi said on Saturday.