Download the PHP package blackpig-creatif/filament-component-picker without Composer
On this page you can find all versions of the php package blackpig-creatif/filament-component-picker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download blackpig-creatif/filament-component-picker
More information about blackpig-creatif/filament-component-picker
Files in blackpig-creatif/filament-component-picker
Package filament-component-picker
Short Description Add a component picker to your filament RichEditor fields
License MIT
Homepage https://github.com/blackpig/filament-component-picker
Informations about the package filament-component-picker
Filament Component Picker
A powerful FilamentPHP package that provides a component picker for RichEditor fields with shortcode rendering support. Insert Blade components into rich text content using a visual picker, and render them on your frontend using shortcode syntax.
Features
- 🎨 Visual Component Picker - Add a button to any RichEditor field to insert components
- 🔍 Auto-discovery - Automatically discovers components from configured directories
- 📝 Shortcode Rendering - Parse and render
[component-name attr="value"]shortcodes on the frontend - 🎯 Smart Type Detection - Automatically detects component prop types (text, URL, KeyValue, nested objects)
- 🎨 CSS Class Merging - Supports components with
$attributes->merge()for custom styling - ⚙️ Highly Configurable - Customize directories, labels, exclusions, and more
Requirements
- PHP 8.2 or higher
- Laravel 11.x or 12.x
- Filament 3.x
Installation
Install the package via composer:
Optionally, you can publish the config file with:
This is the contents of the published config file:
Usage
1. Create Your Components
Create Blade components in resources/views/components/richeditor/:
2. Add Component Picker to Your Filament Resource
3. Render Shortcodes on the Frontend
Advanced Usage
Exclude Specific Components
Exclude All Auto-discovered Components
Use Custom Exclusion Logic
Custom Component Labels
In your config file:
Component Folder Structure
The package uses a hierarchical component resolution system:
Usage in Component Picker:
attribution→ looks inricheditor/, thencomponents/shared.cta-button→ looks inshared/, thencomponents/marketing.newsletter→ looks inmarketing/, thencomponents/
How It Works
In the Admin Panel
- Click the component picker button in any RichEditor field
- Select a component from the dropdown
- Fill in the component's props in the generated form
- The shortcode is inserted:
[component-name prop1="value1" prop2="value2"]
On the Frontend
- ShortcodeParser finds all
[component-name ...]patterns - Validates the component exists and is whitelisted
- Parses attributes (including JSON for complex props)
- Renders the component with the provided attributes
Smart Type Detection
The package automatically detects component prop types:
- KeyValue: Props named
*_data,*_config,*_meta - Nested Objects: Props named
*_settings,*_options,*_params - URLs: Props named
*_url,*_link,link - Text: Everything else (TextInput or Textarea based on name)
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Blackpig
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-component-picker with dependencies
filament/filament Version ^4.0
illuminate/contracts Version ^11.0|^12.0
spatie/laravel-package-tools Version ^1.15.0