Registry Getting Started
Use the radk registry to distribute your own components.
You can host your own registry and share components across projects — or with the community.
Create a Registry
Create a registry.json at the root of your project:
{
"$schema": "https://radk.dev/schema/registry.json",
"name": "my-org",
"homepage": "https://my-org.dev",
"items": [
{
"name": "my-button",
"type": "registry:ui",
"title": "My Button",
"description": "Our custom button.",
"dependencies": ["class-variance-authority"],
"files": [
{
"path": "registry/ui/my-button.tsx",
"type": "registry:component"
}
]
}
]
}Build & Serve
Run the build script to generate the registry JSON:
pnpm registry:buildThis outputs component JSON files to public/r/. Deploy your app and the registry is live at https://your-domain.dev/r.
Consume a Custom Registry
In any project's components.json, point to your registry:
{
"registryUrl": "https://your-domain.dev/r"
}Then add components from it:
npx radk add my-buttonUsing Multiple Registries
{
"registryUrl": "https://radk.dev/r"
}You can also fetch components directly by URL:
npx radk add https://your-domain.dev/r/radk/my-button.json