yu-dev / easyadminlte-bundle
AdminLTE 4 theme for EasyAdmin (Symfony bundle)
Package info
github.com/yuriyakishin/easyadminlte-bundle
Language:Twig
Type:symfony-bundle
pkg:composer/yu-dev/easyadminlte-bundle
Requires
- php: >=8.2
- easycorp/easyadmin-bundle: ^5.6
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
EasyAdmin with your favorite AdminLTE theme. A Symfony bundle that turns the EasyAdmin admin panel into AdminLTE.
The same CRUD controllers, fields, filters and actions of EasyAdmin, the admin generator for Symfony applications, dressed in the familiar look of AdminLTE 4: dark sidebar, cards, small boxes, light and dark color schemes. Install it and your admin looks like AdminLTE, with no PHP changes.
The real AdminLTE, not a look-alike
- Original AdminLTE 4.10.1.
adminlte.min.cssandadminlte.min.jsship unmodified, so upgrading AdminLTE means replacing two files. - AdminLTE markup. The layout, menu, login page, paginator and detail page are overridden to render
the same HTML structure as the AdminLTE demo (
app-wrapper,app-sidebar,card,nav-treeview...), so AdminLTE's classes just work. - Plays nicely with EasyAdmin. AdminLTE is imported into the
@layer adminlteCSS cascade layer, declared after EasyAdmin's layers. A smalleasyadminlte.cssneutralizes the EasyAdmin styles that still leak in (button gradients, fixed field heights, datagrid column widths...). - No CDN. Bootstrap Icons and the Source Sans 3 font (with Cyrillic) are bundled.
Features
- AdminLTE sidebar built from the EasyAdmin menu: sections, submenus (treeview), badges, icons.
- Header with search, user menu and a light/dark switch (backed by EasyAdmin's own color scheme setting).
- Index pages as edge-to-edge tables inside a card, with the paginator in the
card-footer. - New/edit forms with the form actions in the card footer.
- Detail pages as bordered tables.
- AdminLTE-style login page.
- Symfony UX Twig Components for dashboards:
SmallBox,InfoBox,Card.
Requirements
- PHP 8.2+
- Symfony 6.4+ (developed on Symfony 8.1)
- EasyAdmin 5.6+ (it brings Symfony UX Twig Component and Asset along)
Installation
In your Symfony application:
composer require yu-dev/easyadminlte-bundle
If Symfony Flex didn't register the bundle, add it to config/bundles.php:
return [ // ... Yu\EasyAdminLTEBundle\EasyAdminLTEBundle::class => ['all' => true], ];
Publish the assets:
php bin/console assets:install --symlink --relative
Done: open /admin.
Configuration
The theme is enabled by default. To switch back to the stock EasyAdmin look:
# config/packages/easyadminlte.yaml easyadminlte: enabled: false
When disabled, the theme templates and assets are not loaded; the Twig components stay available.
Dashboard components
<div class="row"> <div class="col-lg-3 col-6"> <twig:AdminLTE:SmallBox value="150" text="New orders" icon="bi bi-cart" variant="primary" url="{{ path('admin_order_index') }}" /> </div> <div class="col-lg-3 col-6"> <twig:AdminLTE:InfoBox text="CPU" number="10" unit="%" icon="bi bi-gear-fill" variant="info" progress="10" description="Load over the last hour" /> </div> </div> <twig:AdminLTE:Card title="Latest posts" variant="primary" outline collapsible maximizable> ...card body... <twig:block name="footer"> <a href="{{ path('admin_post_index') }}">All posts</a> </twig:block> </twig:AdminLTE:Card>
| Component | Properties |
|---|---|
SmallBox |
value, text, icon, variant, url, linkLabel |
InfoBox |
text, number, unit, icon, variant, filled, progress (0–100), description |
Card |
title, variant, outline, collapsible, collapsed, maximizable, removable, bodyClass; blocks tools, footer |
variant accepts primary, secondary, success, danger, warning, info, light or dark.
The card collapse, maximize and remove buttons are handled by AdminLTE's JavaScript.
Customizing
Templates are resolved in this order:
- your application's
templates/bundles/EasyAdminBundle/; - this bundle's templates;
- EasyAdmin's original templates.
So any template can be overridden the usual Symfony way
(overriding bundle templates). layout.html.twig adds a few blocks:
| Block | Purpose |
|---|---|
adminlte_body_class |
AdminLTE <body> classes (layout-fixed sidebar-expand-lg...) |
sidebar_brand_image |
sidebar logo |
main_card_header |
header of the page's main card |
app_footer, app_footer_start, app_footer_end |
page footer |
EasyAdmin's own blocks (main_menu, content_title, page_actions...) keep their names.
Author
Yuriy Akishin:
- 📧 Email: yuriy.akishin@gmail.com
- 💼 LinkedIn: https://www.linkedin.com/in/yuriyakishin/
- 💻 GitHub: https://github.com/yuriyakishin
License
MIT. Third-party files in public/: AdminLTE (MIT, license in the adminlte.min.css header),
Bootstrap Icons (MIT) and Source Sans 3 (SIL OFL 1.1); the licenses of the last two sit next to their files.

