You can use theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/shadcn-ui/ui/llms.txt
Use this file to discover all available pages before exploring further.
shadcn CLI to run your own code registry. Running your own registry allows you to distribute your custom components, hooks, pages, config, rules and other files to any project.
The registry works with any project type and any framework, and is not limited to React.
What is a Registry?
A registry is a distribution system for code. It allows you to package and share reusable code components, utilities, hooks, configuration files, and other resources across projects and teams. Think of it as your own npm registry, but for code snippets and components that can be installed directly into your project with proper dependency resolution and configuration.Key Features
Framework Agnostic
Works with any project type - React, Vue, Svelte, PHP, or any framework that supports serving JSON over HTTP.
Dependency Resolution
Automatically resolves and installs both npm packages and registry dependencies.
Type Support
Support for multiple resource types: components, hooks, utilities, pages, themes, and more.
Namespaces
Organize resources with namespaces for better organization and conflict prevention.
How It Works
The registry system follows a simple architecture:Define Your Components
Create your components, hooks, or utilities in your project following the
registry/[STYLE]/[NAME] directory structure.Configure Registry Items
Define each item in your
registry.json file with metadata including name, type, dependencies, and file paths.Build the Registry
Run the
shadcn build command to generate individual JSON files for each registry item.Registry Architecture
A registry consists of two main components:1. Registry Index (registry.json)
The entry point that defines your registry’s name, homepage, and lists all available items:
registry.json
2. Registry Items
Individual JSON files for each component or resource, generated from yourregistry.json during the build process. These files contain:
- Component source code
- Dependencies (npm packages)
- Registry dependencies (other registry items)
- CSS variables and theming
- Environment variables
- Type definitions
Use Cases
Company Component Library
Create a private registry for your organization’s design system and shared components:Open Source Projects
Share your components with the community by publishing a public registry:Multi-Team Collaboration
Organize registries by team or department using namespaces:AI Resources
Distribute AI prompts, rules, and configurations:What You Can Distribute
Registries support multiple resource types:| Type | Description | Example Use Case |
|---|---|---|
registry:component | Simple components | Button, Input, Card |
registry:block | Complex multi-file components | Dashboard, Auth forms |
registry:ui | UI primitives | Dialog, Dropdown, Tooltip |
registry:hook | Custom React hooks | useAuth, useLocalStorage |
registry:lib | Utilities and helpers | Date formatters, validators |
registry:page | Full page templates | Login, Dashboard, Settings |
registry:theme | Theme configurations | Dark mode, Brand themes |
registry:style | Complete style systems | Design system styles |
registry:file | Miscellaneous files | Config files, constants |
Getting Started
Ready to create your own registry? Head over to the getting started guide to build your first registry.Getting Started
Learn how to set up and build your own component registry step-by-step.
Additional Resources
Authentication
Secure your registry with authentication
Namespaces
Configure registries with namespaces
Examples
Registry item examples and configurations
Schema Reference
Schema specification for registry.json