- Can I use contao-components/handorgel directly in a Laravel project without Contao?
- No, this package is designed for Contao CMS and relies on Contao’s templating system. For Laravel, you’d need to abstract its PHP helpers into a service layer or use Handorgel’s vanilla JS via CDN/Vite. Consider Laravel-native alternatives like Alpine.js or Flowbite for tighter integration.
- How do I install this package in Laravel if it’s for Contao?
- Since it’s Contao-specific, you can’t install it via Composer directly in Laravel. Instead, include Handorgel’s JS/CSS via Vite or CDN, then create a custom Blade directive or Laravel service to generate the markup. Example: `npm install @oncode/handorgel` and bundle it with your assets.
- What Laravel versions does this package support?
- This package doesn’t natively support Laravel—it’s for Contao. However, you can integrate Handorgel’s JS library (which has no PHP version constraints) into any Laravel 8+ project using modern asset pipelines like Vite. Test compatibility with your Laravel frontend framework (e.g., Livewire, Inertia).
- Is Handorgel accessible (WCAG-compliant) in Laravel?
- Yes, Handorgel is WCAG-compliant by design. When used in Laravel, ensure your Blade templates or Alpine.js components maintain its ARIA attributes. Test with tools like `laravel-shift/accessibility` or axe-core to validate keyboard navigation and screen reader support.
- How do I configure Handorgel for dynamic content in Laravel?
- For dynamic content, initialize Handorgel via JavaScript after Laravel renders the markup. Use Alpine.js or Stimulus to toggle classes/attributes, then call `Handorgel.init()` on the updated DOM. Example: `document.addEventListener('DOMContentLoaded', () => Handorgel.init());` in your Vite bundle.
- Are there Laravel alternatives to Handorgel for accordions?
- Yes, consider Alpine.js (lightweight, no jQuery), Flowbite (Tailwind-based components), or Laravel-specific packages like `spatie/laravel-accordion`. These integrate seamlessly with Laravel’s ecosystem and avoid Contao dependencies. Benchmark performance and maintenance effort before choosing.
- Will this package work with Laravel Livewire or Inertia.js?
- Indirectly—you’d need to include Handorgel’s JS via Livewire’s `@stack` or Inertia’s asset pipeline. For Livewire, initialize Handorgel in a `mount()` method or Alpine component. Inertia.js projects can bundle it with Vite. Avoid Contao’s PHP helpers; focus on the JS library’s standalone functionality.
- How do I handle CSS conflicts between Handorgel and Laravel’s Tailwind/Bootstrap?
- Use Vite’s CSS scoping or PostCSS to namespace Handorgel’s styles. For Tailwind, override default styles in your `tailwind.config.js` or wrap Handorgel’s markup in a unique class. Test in isolation to avoid bleed-over into other components.
- Is this package actively maintained? Should I use it for production?
- The package has no visible maintenance (0 stars, no recent commits). For production, evaluate Handorgel’s standalone JS library (maintained by Oncode) instead. If you proceed, document the Contao-to-Laravel abstraction layer and monitor for breaking changes in Handorgel’s core.
- Can I migrate a Contao site using Handorgel to Laravel without rewriting everything?
- Partial migration is possible. Replace Contao’s backend with Laravel while keeping Handorgel for frontend interactivity. Use a hybrid approach: serve Contao templates via Laravel’s Blade or Inertia.js, and gradually replace Handorgel with Laravel-native solutions (e.g., Alpine.js) as you modernize.