- Accordion
- Agent Thinking
- Alert
- Alert Dialog
- Announcement
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Checkbox
- Checkbox Card
- Code Block
- Collapsible
- Color Picker
- Combobox
- Command
- Composer
- Composer Loader
- Context Menu
- Data Grid
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- File Upload
- Hover Card
- Input
- Input Group
- Input Otp
- Item
- Kbd
- Label
- Marker
- Menubar
- Message
- Message Scroller
- Meter
- Native Select
- Navigation Menu
- Number Field
- Pagination
- Period Switcher
- Popover
- Progress
- Questionnaire
- Radio Card
- Radio Group
- Resizable
- Reveal
- Scroll Area
- Search Field
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Social Button
- Sonner
- Spinner
- Status Dot
- Switch
- Switch Card
- Table
- Tabs
- Tag Group
- Textarea
- Theme Toggle
- Time Field
- Toggle
- Toggle Group
- Tooltip
- Trace
- Tree View
- Agent Creator 01
- Agent Limits Card 01
- Agent Progress 01
- AI Chat 01
- AI Image Generation 01
- AI Profile 01
- Alerts Card 01
- Auth Card 01
- Calendar 01
- Composer 01
- Composer Attachments 01
- Composer Panel 01
- Finance Dashboard 01
- Home Dashboard 01
- Marketing Dashboard 01
- Medical Profile 01
- Meeting Scheduler 01
- Multi Agent Chat 01
- Notification Center 01
- Patient Info Card 01
- Project Board 01
- Questionnaire 01
- Settings Modal 01
- Sidebar 01
- Stat Cards 01
- Task List 01
- Web Search 01
- Activity Rings Card 01
- Area Chart Card 01
- Bar List Card 01
- Combo Chart Card 01
- Contributions Card 01
- Earnings Chart Card 01
- Funnel Chart Card 01
- Heatmap Chart Card 01
- Line Chart Card 01
- Most Active Days Card 01
- Orders Chart Card 01
- Radar Chart Card 01
- Radial Chart Card 01
- Revenue Chart Card 01
- Sankey Chart Card 01
- Scatter Chart Card 01
- Sleep Score Card 01
- Stage Bars Card 01
- Steps Card 01
Building Your Component
1. Get the Template
Clone this repository, or copy it as the starting point for your own project.
2. Install Dependencies
pnpm install3. Create Your Component
Add a new file at registry/cobalt/ui/my-button.tsx:
import { forwardRef, HTMLAttributes } from "react";
import { cn } from "@/lib/utils";
export interface MyButtonProps extends HTMLAttributes<HTMLButtonElement> {
variant?: "default" | "outline";
}
const MyButton = forwardRef<HTMLButtonElement, MyButtonProps>(
({ className, variant = "default", ...props }, ref) => {
return (
<button
ref={ref}
className={cn(
"rounded-md px-4 py-2 font-medium",
variant === "default" && "bg-primary text-primary-foreground",
variant === "outline" && "border border-input",
className
)}
{...props}
/>
);
}
);
MyButton.displayName = "MyButton";
export { MyButton };4. Update registry.json
{
"name": "your-name/your-registry",
"homepage": "https://your-site.com",
"items": [
{
"name": "my-button",
"type": "registry:ui",
"title": "My Button",
"description": "A custom button component.",
"files": [
{
"path": "registry/cobalt/ui/my-button.tsx",
"type": "registry:ui",
"target": "components/ui/my-button.tsx"
}
]
}
]
}5. Build & Deploy
pnpm registry:build
pnpm buildDeploy your app and your component is live!
Use This Registry
Every item here depends on other items from this registry (for example @cobalt/button or @cobalt/input-group), so register the @cobalt namespace once in your project's components.json. Without it, npx shadcn@latest add @cobalt/<name> fails with an unknown registry error.
{
"registries": {
"@cobalt": "https://your-site.com/r/{name}.json"
}
}Replace your-site.com with the domain where this registry is deployed. Then add any item by name:
$ pnpm dlx shadcn@latest add @cobalt/button
Components and blocks install into components/ui/ and components/, with their helper files next to them, so imports resolve without edits.
Theme
Components work with any shadcn theme. Add theme-cobalt to get the exact gradients, hairline borders, shadows and status colors these components were designed around:
$ pnpm dlx shadcn@latest add @cobalt/theme-cobalt
Use A Component
import { MyButton } from "@/components/ui/my-button";
export function Demo() {
return <MyButton variant="outline">Click me</MyButton>;
}Your own registry works the same way: register its URL under a namespace of your choice, then add items as @your-namespace/<name>.