Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Twig Components

Twig Components Laravel Package

ibexa/twig-components

Ibexa DXP Twig Components provides reusable Twig components and helpers used across Ibexa DXP. Install and use it as part of a full Ibexa DXP setup rather than standalone. Licensed under Ibexa Business Use (BUL) or Trial/Test (TTL).

View on GitHub
Deep Wiki
Context7

Ibexa Twig Components is bundle that enables dynamic component registration and rendering in Ibexa applications

Frequently asked questions about Twig Components
Can I use ibexa/twig-components in a Laravel project without Ibexa DXP?
Yes, but with limitations. The package is designed for Ibexa DXP, but its core components like `ibexa.Table` can work in Laravel if you abstract Ibexa-specific logic (e.g., wrap Eloquent collections or API responses in a service layer). Start with high-impact use cases like admin tables or reporting grids.
How do I install ibexa/twig-components in Laravel?
This package is part of Ibexa DXP, so you must install Ibexa DXP first (follow [official docs](https://doc.ibexa.co/en/latest/install/)). For Laravel integration, use `spatie/laravel-twig` to bridge Twig with Blade. Avoid standalone installation—it’s not supported.
Does ibexa/twig-components work with Laravel Blade templates?
Indirectly. Use `spatie/laravel-twig` to embed Twig components in Blade via `@twig` directives or include Twig views separately. For dynamic rendering, consider custom Twig helpers or bridges like Blade-Twig. Test with v5.0.9’s improved error handling for missing dependencies.
What Laravel versions and dependencies does v5.0.9 support?
v5.0.9 requires **Twig 3.x+** and **PHP 8.0+**. For Laravel, ensure your Twig setup (e.g., `spatie/laravel-twig`) supports these versions. No direct Eloquent integration exists—wrap Laravel collections manually or use a data mapper service for tables.
Are there alternatives to ibexa/twig-components for Laravel tables?
Yes. For dynamic tables, consider `yajra/laravel-datatables` (jQuery-based) or `livewire/tables` (Livewire). For lightweight Twig tables, explore `twiglabs/twig-table` or build custom Twig extensions. Ibexa’s components excel in CMS-driven UIs but may overkill for simple CRUD.
How do I handle styling conflicts with ibexa/twig-components?
Override default styles via SASS/Tailwind by extending Ibexa’s component templates. Use CSS scoping (e.g., BEM) to avoid conflicts. For Laravel, integrate with your existing asset pipeline (e.g., Vite or Laravel Mix) to compile custom styles.
What’s the best way to test ibexa/twig-components in Laravel?
Start with a non-critical module (e.g., admin dashboard) to test Twig integration. Use Laravel’s `HttpTesting` to verify Twig components render correctly. Mock Ibexa dependencies (e.g., content services) with Laravel’s service container bindings for isolated testing.
Can I use ibexa/twig-components in production without Ibexa DXP?
Technically possible, but risky. The package assumes Ibexa DXP’s architecture. For production, abstract Ibexa-specific logic (e.g., content fetching) into Laravel services. Monitor performance with large datasets—optimize Twig caching and pagination early.
How does v5.0.9’s error handling improve Laravel integration?
v5.0.9 adds exception handling for missing Twig bundles (IBX-10990), reducing runtime failures in Laravel’s dynamic environment. Use this to debug missing dependencies early—log errors during service container bootstrapping or component registration.
What are the licensing implications for using this package in Laravel?
This package requires either an **Ibexa Business Use License (BUL)** (for DXP subscribers) or **Trial/Test License (TTL)**. Standalone Laravel use may violate terms—contact Ibexa for clarification. Forking is an option if licensing becomes restrictive, but maintain compatibility with Ibexa’s roadmap.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views