Capítulo 8 de 108

Registry Directory

Core Idea

The Registry Directory lists community registries built into the CLI, installable with no extra config via npx shadcn add @<registry>/<component>. It also links to the docs for running your own custom registry.

Key Concepts

  • Built-in registries: reachable via @<registry>/<component> syntax without any components.json registry config, unlike private/namespaced registries which require explicit setup.
  • Community-maintained: third-party developers maintain these; review code on install for security/quality (no automatic trust guarantee).
  • Custom/self-hosted registry: the shadcn CLI can run your own registry to distribute custom components, hooks, pages, config, rules, and other files to any project.

Code Examples

npx shadcn add @<registry>/<component>
  • O que demonstra: sintaxe geral para instalar de qualquer registry listado no directory.

Anti-patterns

  • Installing from a community registry without reviewing the code: these aren't vetted by shadcn/ui itself.

Key Takeaways

  1. Built-in registries need zero components.json configuration; only custom/private ones need the registries field (see components.json chapter).
  2. Running your own registry follows the same registry.json schema and shadcn build flow as any custom distribution.
  3. Related registry docs live under: Getting Started, Authentication, Namespaces, Add a Registry, Examples, Schema (registry.json).

Connects To

  • components-json: the registries field is where private/namespaced registries (not in this directory) get configured.
  • cli: add, search/list, view, and build are the commands used against any registry, built-in or custom.