President Reagan slapped stiff trade sanctions on Brazil yesterday, in retaliation for that country's long-standing restrictions on sales of foreign computers and computer products, which he said cost U.S. manufacturers an estimated $105 million a year.

The sanctions, which administration officials said would have been imposed long ago if it had not been for Brazil's status as the largest Third World debtor nation, will ban all imports of Brazilian computer products. They will also increase tariffs by $105 million a year on products ranging from cars and civilian airplanes to traditional low-technology exports such as leather shoes, earthenware and wood furniture.

President Reagan said he acted on a trade complaint that has been pending since 1985 after Brazil failed to keep a commitment it made a year ago to implement its restrictive "informatics" law "in a more flexible, reasonable and just manner."

In a statement issued by the White House, Reagan said, "Recent developments in Brazil make it clear that these commitments are not being kept."

The president's action was applauded on Capitol Hill, where lawmakers said it was long in coming, and by high-technology industries, some of which had previously urged restraint on the administration.

"We have concluded that the U.S. government is right and we are in full support of its actions. Brazil has gone too far for even our very conservative companies," said Charlotte LeGates, a spokesman for the Computer and Business Equipment Manufacturers Association.

The Brazilian government reacted cautiously to the announcement of retaliation against its protectionist computer law. Science and Technology Minister Luis Henrique da Silveira told a news conference in the capital city of Brasilia that President Jose Sarney would reply directly to Reagan after the government decided what to do. The minister did not exclude the possibility of retaliation against American products, but said Brazil would wait for the sanctions to take effect before taking any action. The sanctions are expected to take effect before the end of this year.

President Reagan had postponed imposing sanctions against Brazil's restrictive policies at least twice since the unfair-trade complaint was instituted in September 1985. The case was suspended last December, when Brazil committed itself to a more flexible interpretation of the law, which is to expire in 1992.

The straw that broke the camel's back, Reagan said, was Brazil's decision in September to reject efforts by Microsoft Corp. to sell its widely used MS-DOS software operating system in Brazil, asserting that a domestic company makes a product that does the job as well. U.S. officials said the Brazilian software is a poor copy of the Microsoft product.

President Reagan said the decision to bar Microsoft "effectively bans U.S. companies from the Brazilian software market. It is also likely to increase piracy of foreign software, since demand for the prohibited product will continue."

The U.S. assault on Brazil's policies to protect its computer and software industries with trade restrictions is a major issue in that nation, where defying Reagan administration threats has become a matter of national honor. The computer industry has strong support in Brazil, because it has become a major employer in that country.

But the Reagan administration has become increasingly irked at Brazil's trade policies, which use its heavy international debt burden and the need to increase its exports to pay back western banks and multilateral lending institutions as a shield against sanctions for its protectionist practices.

In addition, Brazil has been leading a small group of nations in opposition to Reagan administration objectives in a new round of global trade talks.

Washington Post Special Correspondent Richard House contributed to this report from Sao Paulo, Brazil.