We will be talking about CLI and Registry

Lets talk about pre shadcn era -

What the hell is this registry?

NPM

npm.png

Registry

Publisher -

  1. You have build a beautiful UI component which lies in your codebase, now you want to share it to the world so that they can use it in their projects too.
  2. You will create a registry.json file in the root folder of your code base
  3. Add your component to the registry item by following the schema https://ui.shadcn.com/docs/registry/registry-item-json.
  4. Run the build script provided by the shadcn CLI.
  5. The build script will generate the registry JSON files in public directory of your project. e.g public/r/button.json.