Taiwan on Tuesday warned its citizens of risk in visiting Hong Kong after China's parliament passed national security legislation for the city while Taiwan's president said she was disappointed about the law.

The security legislation imposed on Hong Kong sets the stage for the most radical changes to the former British colony's way of life since it returned to Chinese rule 23 years ago.

The new law would "severely impact" freedom, democracy and human rights in Hong Kong, Taiwan's cabinet said in a statement, adding that the democratic island would continue to offer help to Hong Kong people.