shadcn/cli
Learn how to use the shadcn/cli to add 3rd party components.
The shadcn/cli is a command-line interface tool designed to streamline the integration of UI components into your projects. The starter kit is fully compatibility with the shadcn@canary CLI, ensuring seamless integration with monorepo setups. This setup mirrors the structure found in the shadcn-ui/ui monorepo, including identical names, paths and configurations.
You can install a component as shown below - using the packages/ui
example, but this method also applies to apps/dashboard
or apps/marketing
installations:
cd packages/ui
pnpm dlx shadcn@canary add "https://magicui.design/r/bento-grid"
Make sure you use the canary version, because monorepo support for the CLI is still in canary.
While shadcn adheres to his own components.json standard, you can't be sure that magic ui or other 3rd party are meticulous as well about it. They might contain an import bug here or there.