# add component

Learn how to add a component to your project.

This command adds one or more [components](/explanation/component) to your project, [regenerating type definitions](/reference/cli/type-generation) accordingly.

## Usage

This command has the following syntax:

```sh
croct add component <components>
```

## Example

Add a component interactively:

```sh
croct add component
```

Add a specific component:

```sh
croct add component my-component
```

Add multiple components at once:

```sh
croct add component hero-banner sidebar-cta
```

Add a component at a specific version:

```sh
croct add component my-component@2
```

## Arguments

- `components`: `Array<string>` (optional)

  One or more components to add, separated by spaces.

  You can specify a version for each component using the `@` symbol, for example `my-component@2`. If omitted, the CLI prompts you to select components interactively.

## Options

This command only accepts [global options](../global-options).

## Explore

- [Type generation](/reference/cli/type-generation): Learn how the CLI generates type definitions.
- [Remove component](/reference/cli/commands/remove-component): Learn how to remove a component from your project.
