Skip to content

Add components and features

Install components, utilities, and features from the registry with nimbus-docs add.

AI-generated · awaiting reviewUpdated

nimbus-docs add <slug> installs from the registry. It works in two modes depending on what you’re adding — files copy in, or a recipe hands off to a coding agent.

Components and utilities

For registry:ui and registry:lib slugs, the CLI resolves dependencies, copies files into your repo, and installs any npm packages they need:

npx @cloudflare/nimbus-docs add accordion
  1. Resolve dependencies

    The CLI walks the slug’s registryDependencies and npm dependencies transitively.

  2. Copy files

    Each file lands at its declared path — src/components/ui/<slug>/, src/lib/, etc.

  3. Register globals

    Components used in MDX without an import must be added to src/components.ts. The CLI tells you which.

Once installed, the component lives in your repo — edit it freely. To reinstall a component you already have, pass --overwrite: it replaces files you haven’t edited and asks about the ones you have. --yes alone still keeps your files; --overwrite --yes replaces edited files too. CLI has every flag.

Features

For registry:feature slugs there’s nothing to copy. The recipe is a Markdown prompt a coding agent reads, adapts to your project, and applies:

npx @cloudflare/nimbus-docs add 404-page

If a coding agent is detected in the environment, the CLI prints the recipe to stdout for it to consume. Otherwise pipe it yourself:

npx @cloudflare/nimbus-docs add 404-page --print | claude

Browse what’s available

npx @cloudflare/nimbus-docs list
npx @cloudflare/nimbus-docs list --type ui

Every shipped component also has a showcase at /components — preview, props, and the install command. See the CLI reference for all flags.

Type to search…

↑↓ navigate↵ selectEsc close