PHPackages                             lindemannrock/craft-component-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. lindemannrock/craft-component-manager

ActiveCraft-plugin[Templating &amp; Views](/categories/templating)

lindemannrock/craft-component-manager
=====================================

Advanced component management for Craft CMS with folder organization, prop validation, and slots

5.5.1(1mo ago)097proprietaryPHPPHP ^8.2CI passing

Since Sep 2Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/LindemannRock/craft-component-manager)[ Packagist](https://packagist.org/packages/lindemannrock/craft-component-manager)[ RSS](/packages/lindemannrock-craft-component-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (22)Used By (0)

Component Manager for Craft CMS
===============================

[](#component-manager-for-craft-cms)

[![Latest Version](https://camo.githubusercontent.com/37350949b71b2a7844ff88cbad7ac7ef38a460d1085496cdde2f51b72e95417c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c696e64656d616e6e726f636b2f63726166742d636f6d706f6e656e742d6d616e616765722e737667)](https://packagist.org/packages/lindemannrock/craft-component-manager)[![Craft CMS](https://camo.githubusercontent.com/c176c7ad994b4d577c758871323311a223477bd0cd427c40a8472fd0cad04992/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4372616674253230434d532d352e302b2d6f72616e67652e737667)](https://craftcms.com/)[![PHP](https://camo.githubusercontent.com/5fe05c705bf034839bda7651781e4d0a9d42f4a840478ca5e343873a0361bb89/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d626c75652e737667)](https://php.net/)[![Logging Library](https://camo.githubusercontent.com/9f888210e896f206c091faebf48bba25432d6cb565949a794784d624ef3a9c32/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6f6767696e672532304c6962726172792d352e302b2d677265656e2e737667)](https://github.com/LindemannRock/craft-logging-library)[![License](https://camo.githubusercontent.com/9c6edf18ea92d6c6ab0c22de89d93b4727294e9bd973d127b467fcc50982028d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c696e64656d616e6e726f636b2f63726166742d636f6d706f6e656e742d6d616e616765722e737667)](LICENSE)

Advanced component management plugin for Craft CMS 5.x with comprehensive Control Panel interface, automatic component discovery, rich documentation parsing, and professional preview system.

License
-------

[](#license)

This is a commercial plugin licensed under the [Craft License](https://craftcms.github.io/license/). It will be available on the [Craft Plugin Store](https://plugins.craftcms.com) soon. See [LICENSE.md](LICENSE.md) for details.

⚠️ Pre-Release
--------------

[](#️-pre-release)

This plugin is in active development and not yet available on the Craft Plugin Store. Features and APIs may change before the initial public release.

Features
--------

[](#features)

- ✅ **Comprehensive CP Interface** - Full Control Panel integration with searchable component library
- ✅ **Automatic Discovery** - Scans and catalogs all components from filesystem to database
- ✅ **Rich Documentation Parsing** - Extracts @description, @category, @props, @slots, @examples from component comments
- ✅ **Professional Preview System** - Live component previews with resizable viewport and device presets
- ✅ **Smart Component Organization** - Category-based filtering and sorting in sidebar
- ✅ **Database Storage** - Components stored as Craft Elements for efficient querying and management
- ✅ **Folder Organization** - Organize components in nested folders (e.g., `forms/input.twig`)
- ✅ **Function-Based Syntax** - Clean component functions: `{{ component('button', {label: 'Click'}) }}`
- ✅ **Prop Validation** - Define and validate component props with types and defaults
- ✅ **Multiple Slots** - Support for named slots with descriptions
- ✅ **Console Commands** - Sync and refresh components via CLI
- ✅ **Usage Tracking** - Track component usage and statistics

Development Status
------------------

[](#development-status)

✅ **Core Functionality: Production Ready** - Component parsing, rendering, prop validation, and slots work great in production.

🚧 **Control Panel Features: Work in Progress** - The CP interface and documentation features are still being developed.

**Production Ready:**

- ✅ Component parsing and rendering (fully functional)
- ✅ Function-based syntax (`component()`, `c()`)
- ✅ Prop validation and defaults
- ✅ Multiple slots support
- ✅ Folder organization
- ✅ Database structure and migrations
- ✅ Logging integration

**CP Features (WIP):**

- 🚧 **Preview system** - Requires CSS loading solution (Vite manifest reader or Tailwind Manager integration)
- 🚧 **Documentation generation** - Parser needs refinement
- 🚧 **Live preview iframe** - Missing proper stylesheet loading
- 🚧 **Component library UI** - Being actively developed

**Use in production** for component rendering. CP features are being improved but don't affect frontend functionality.

Requirements
------------

[](#requirements)

- Craft CMS 5.0 or greater
- PHP 8.2 or greater
- [Logging Library](https://github.com/LindemannRock/craft-logging-library) 5.0 or greater (installed automatically as dependency)

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
cd /path/to/project
```

```
composer require lindemannrock/craft-component-manager
```

```
./craft plugin/install component-manager
```

### Using DDEV

[](#using-ddev)

```
cd /path/to/project
```

```
ddev composer require lindemannrock/craft-component-manager
```

```
ddev craft plugin/install component-manager
```

### Via Control Panel

[](#via-control-panel)

In the Control Panel, go to Settings → Plugins and click "Install" for Component Manager.

Configuration
-------------

[](#configuration)

### Config File

[](#config-file)

Create a `config/component-manager.php` file to override default settings:

```
cp vendor/lindemannrock/craft-component-manager/src/config.php config/component-manager.php
```

```
