add component
Learn how to add a component to your project.
This command adds one or more components to your project, regenerating type definitions accordingly.
Usage
This command has the following syntax:
croct add component <components>Example
Add a component interactively:
npm
npx croct@latest add componentAdd a specific component:
npm
npx croct@latest add component my-componentAdd multiple components at once:
npm
npx croct@latest add component hero-banner sidebar-ctaAdd a component at a specific version:
npm
npx croct@latest add component my-component@2Arguments
- components(optional)Array<string>
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.