Following one of the most violent political riots here in 30 years, Taiwan's nationalist Chinese government has jailed much of its political opposition in a key southern port and shut down all major opposition publications on the island.

It is a tense moment in a constantly shifting relationship between government and opposition that will determine the political future of this prosperous island and its eventual relationship with both the Chinese mainland and Taiwan's principal ally, the United States.

The latest crackdown, resulting from a Dec. 10 riot at the port city of Kaohsiung, also shows the government's continued skill at handling its few vocal critics.

The dissidents, mostly native Taiwanese seeking more say in a government dominated by elderly anticommunist refugees from the Chinese mainland, have been betrayed by their own inexperience and clumsiness. The government has been able to suppress them without visibly disturbing Taiwan's economic and social health or diminishing the popularity of President Chiang Ching-kuo's government.

"Most of the opposition is very green," said one longtime American resident here, "because whenever a new group pops up, the government puts them away."

Chiang is expected to keep the opposition off balance by following up his crackdown with some easing of restraints later in the year. In particular, he is expected to reschedule the parliamentary elections that were canceled a year ago, in what the government said was a move to insure unity after the shock announcement of U.S. diplomatic recognition of Peking, followed by the withdrawal of U.S. military forces here.

Diplomatic and business sources here do not expect the elections, however, until after Taiwan has negotiated the purchase of more "defensive" arms from the United States, promised by President Carter. Taipei wants the long-range F4 fighter, but Washington insists on the 150-mile combat range, limited armament F5E. Chiang is said not to want the issue hanging over any election campaign.

Although mainland refugees and their families make up a small minority of the population, they control the government assemblies because each province of mainland China is granted representation in the Taiwan legislature. Nationalist Chinese legislators vote on behalf of their alleged mainland constituents whom they have not seen in 30 years.

Taiwanese candidates independent of the ruling nationalist party, the Kuomintng, have done well in some local elections in recent years, however. As the old-line mainlanders die out, it is clear to everyone -- including apparently President Chiang -- that political power here will eventually take recognition of that biological fact. Chiang, in 1978, selected as his vice president Shieh Tung-min, a native Taiwanese who has been loyal to the nationalists.

"The opposition people know the future is theirs," said the Western businessman here, "but some people say, 'We know it, but we don't want to wait.'"

At the Dec. 10 Kaohsiung riot, the government's opponents seriously weakened their standing in what is one of their strongholds by allowing a World Human Rights Day march to get out of control. When huge crowds of onlookers and a line of military police closed off the exits from a traffic circle reached by about 500 demonstrators, 50 or 70 young men armed with torches and iron clubs attacked the government men, who had wooden clubs and shields. There were attacks on police, who had reportedly beaten two opposition supporters the night before and who were blamed for the ransacking of some opposition offices.

More than 40 policemen and government security officers were hospitalized. The dissidents could produce no evidence of serious injuries to their own people. The government rushed to televise pictures of the most seriously injured police. Thus there was little public outcry when police arrested about 40 of the government opponents involved in the riot.

Taipei authorities quickly shut down the popular, 50,000 circulation magazine that had sponsored the march, Meilitao, which means "beautiful island" but is usually translated into the equivalent Portuguese word, Formosa. Government hardliners, seeing an opportunity to silence all opponents, then also closed the one remaining opposition magazine, a moderate periodical called The Eighties.

Shih Ming-teh, an electrifying orator who was general manager of Formosa magazine and a leading march organizer, went into hiding. The government has offered a $13,890 reward for information leading to his capture and has deported his outspoken American wife, Linda Arrigo. Arrigo speaks fluent Mandarin as well as the local Amoy dialect spoken by Taiwanese. She was active before her deportation in enlisting support from the foreign press, held a press conference in Hong Kong on her way back to the United States and has continued to approach newspapers near her home in California.

The government has tried to discredit Arrigo, allowing the publication of an allegedly false report that she was trained by the U.S. Central Intelligence Agency.

Taipei authorities, reflecting an apparent split between hard-liners and liberals in the government, have also tried to placate their moderate opponents. The staff of The Eighties, whose most prominent backer is elected national legislative member Kang Ninghsiang, was given permission to start another magazine, but as a protest, the staffers have decided to postpone it.

Dissidents say the police in Kaohsiung created the conditions for the riot by beatings and threats, and that some people were harmed, although not seriously, by electric cattle prods used by some police. They say they will continue to push for their demands: full representation for Taiwanese, dissolution of martial law, amnesty for political prisoners and freedom of speech. They claim support from intellectuals and workers who in this bustling economy still feel shortchanged because of low wages.

But there is no widespread resentment against the mainlanders that might fuel a stronger protest.

One opposition researcher, taking an informal poll, found that even Taiwanese sympathetic to the movement did not mind having to learn the mainland language, Mandarin, in school, and considered themselves Chinese first, and Taiwanese second.