Skip to content

Adding components

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

AI-generated · awaiting reviewUpdated View as Markdown

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

Resolve dependencies

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

Copy files

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

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. Pass --yes to skip overwrite prompts.

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.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close