Docs
Registry
How components are described and served to the gallery and CLI.
The registry is the single source of truth for the gallery, the detail pages and the install command. It lives in web/src/lib/registry, with one file per category (buttons, cards, inputs, …).
A registry entry
tsx
export type Variant = {
id: string;
name: string;
category: CategorySlug;
description?: string;
tags?: string[];
/** Kotlin / Jetpack Compose source users copy. */
code: string;
/** Live preview node (rendered with shadcn + Tailwind). */
preview: ReactNode;
};The install command is derived from the id (npx caveui@latest add <id>), and the web preview is an approximation — the Kotlin source is always the source of truth.