---
title: "Add components and features"
description: "Install components, utilities, and features from the registry with nimbus-docs add."
---

> Documentation Index
> Fetch the complete documentation index at: https://nimbus-docs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add components and features

`nimbus-docs add <slug>` installs from the [registry](/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:

```sh
npx @cloudflare/nimbus-docs add accordion
yarn nimbus-docs add accordion
pnpm nimbus-docs add accordion
bunx @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](/cli#nimbus-docs-add-slug) 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:

```sh
npx @cloudflare/nimbus-docs add 404-page
yarn nimbus-docs add 404-page
pnpm nimbus-docs add 404-page
bunx @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:

```sh
npx @cloudflare/nimbus-docs add 404-page --print | claude
yarn nimbus-docs add 404-page --print | claude
pnpm nimbus-docs add 404-page --print | claude
bunx @cloudflare/nimbus-docs add 404-page --print | claude
```

## Browse what's available

```sh
npx @cloudflare/nimbus-docs list
yarn nimbus-docs list
pnpm nimbus-docs list
bunx @cloudflare/nimbus-docs list
```
```sh
npx @cloudflare/nimbus-docs list --type ui
yarn nimbus-docs list --type ui
pnpm nimbus-docs list --type ui
bunx @cloudflare/nimbus-docs list --type ui
```

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

Source: https://nimbus-docs.com/styling/add-components/index.mdx
