Add Opalus UI
To add Opalus UI Library to your Shadcn UI config,you should do the following steps:
1.Init the shadcn config file
Section titled “1.Init the shadcn config file”pnpm dlx shadcn@latest initThis will create a components.json file in the root of your project.
2.Add Opalus UI to the shadcn config file
Section titled “2.Add Opalus UI to the shadcn config file”Open the components.json file and add the following code.
"registries": { "@opalus-ui": "https://opalus-ui.vercel.app/r/{name}.json" }3.Install Opalus UI components
Section titled “3.Install Opalus UI components”You can now install Opalus UI components using the shadcn CLI. For example, to install the modal component, run the following command:
bash
pnpm dlx shadcn@latest add @opalus-ui/modal4.For users in China Mainland
Section titled “4.For users in China Mainland”If you are in China Mainland, you may want to use the following registry link instead:
{ "registries": { "@opalus-ui": "https://opalus-ui.miyuzu.top/r/{name}" }}However, it is also sometime unreliable when you are in China Mainland.It is recommended to use a VPN for better access to the original registry.