The US Congress passed the Preventive Detention act of 1984. This allowed courts to detain people under the assumption that the government cannot assure the safety of the people and well being of the people in the community the accused individual lives.
This act was challenged in the US vs Salerno case. However, the Supreme Court concluded that there was no violation of the due process clause of the Fifth Amendment nor the excessive bail language of the 8th Amendment.
This set the precedent that the Supreme Court was, in fact, regarding the Preventive Detention Act of 1984 as Constitutional.