rem42 / sylius-admin-kit-bundle
Opt-in admin features (quick filter, active filters, environment indicator, entity filter autocomplete) for Sylius Stack admin UIs, with shadcn and bootstrap (Tabler) themes.
Package info
github.com/rem42/sylius-admin-kit-bundle
Type:symfony-bundle
pkg:composer/rem42/sylius-admin-kit-bundle
Requires
- php: ^8.4
- sylius/admin-ui: ^0.14
- sylius/grid-bundle: ^1.16
- sylius/twig-hooks: ^0.14
- symfony/config: ^7.4 || ^8.0
- symfony/dependency-injection: ^7.4 || ^8.0
- symfony/http-foundation: ^7.4 || ^8.0
- symfony/http-kernel: ^7.4 || ^8.0
- symfony/property-access: ^7.4 || ^8.0
- symfony/routing: ^7.4 || ^8.0
- symfony/translation-contracts: ^3
- symfony/ux-icons: ^2.20 || ^3.0
- twig/twig: ^3.12
Requires (Dev)
- doctrine/doctrine-bundle: ^2.13 || ^3.0
- doctrine/orm: ^3.4
- pagerfanta/doctrine-orm-adapter: ^4.6
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-doctrine: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^11.5
- rem42/php-cs-fixer-config: ^4.1
- rem42/shadcn-admin-ui: ^1.0
- sylius/bootstrap-admin-ui: ^0.14
- sylius/ui-translations: ^0.14
- symfony/asset-mapper: ^7.4 || ^8.0
- symfony/browser-kit: ^7.4 || ^8.0
- symfony/console: ^7.4 || ^8.0
- symfony/css-selector: ^7.4 || ^8.0
- symfony/http-client: ^7.4 || ^8.0
- symfony/translation: ^7.4 || ^8.0
- symfony/twig-bundle: ^7.4 || ^8.0
- symfony/ux-autocomplete: ^2.17 || ^3.0
- symfony/ux-live-component: ^2.17 || ^3.0
- symfony/ux-toolkit: ^3.6
- symfony/validator: ^7.4 || ^8.0
- symfony/yaml: ^7.4 || ^8.0
- symfonycasts/tailwind-bundle: ^1.0
- vincentlanglet/twig-cs-fixer: ^4.1
Suggests
- doctrine/persistence: For the labels of the entity criteria of the active filters (their id otherwise)
- rem42/shadcn-admin-ui: For the shadcn theme
- sylius/bootstrap-admin-ui: For the bootstrap (Tabler) theme
- symfony/ux-autocomplete: For the entity filter autocomplete
Provides
None
Conflicts
None
Replaces
None
README
Opt-in admin features for Sylius Stack admin UIs, themed for
rem42/shadcn-admin-ui (Tailwind) and
sylius/bootstrap-admin-ui (Tabler).
| Feature | What it does |
|---|---|
| Quick filter | Tabs above a grid, built from an enum filter, with optional counts and coloured dots. |
| Active filters | Removable chips listing the criteria that filter a grid, visible even when the filters are collapsed. |
| Environment indicator | Coloured strip on every admin page, badge in the navbar and on the login page. |
| Entity filter autocomplete | entity grid filters become searchable Tom Select comboboxes. |
Everything is disabled by default: installing the bundle changes nothing until you enable a feature. A disabled feature registers no service, no Twig function and no hook.
Quick start
composer require rem42/sylius-admin-kit-bundle
// config/bundles.php return [ // ... Rem42\SyliusAdminKit\Rem42SyliusAdminKitBundle::class => ['all' => true], ];
# config/packages/rem42_sylius_admin_kit.yaml rem42_sylius_admin_kit: quick_filter: enabled: true active_filters: enabled: true environment: enabled: true entity_filter_autocomplete: enabled: true
The theme is detected (shadcn when Rem42ShadcnAdminUiBundle is loaded, bootstrap otherwise) and can be forced
or replaced by your own, see Themes. With the shadcn theme, add one line to your Tailwind CSS,
see Installation.
Documentation
- Installation
- Configuration reference
- Quick filter
- Active filters
- Environment indicator
- Entity filter autocomplete
- Themes (built-in and custom themes, file contract)
Development
make up # demo application showing the features, in both themes (login: admin / admin): # http://localhost:8080/admin (bootstrap) # http://localhost:8080/shadcn/admin (shadcn) make ci # php-cs-fixer + twig-cs-fixer + PHPStan (level max) + PHPUnit make install # composer install
The shadcn theme comes from a checkout of the kit-compat branch of the kit, which must sit next to this repository
(composer path repository, mounted in the Docker container) until shadcn-admin-ui 2 is released:
git clone -b kit-compat https://github.com/rem42/shadcn-admin-ui ../shadcn-admin-ui-kit-compat
The demo application lives in tests/Application. Each theme runs in its own kernel (App\Kernel): bundles flagged
with its name in config/bundles.php, configuration of config/packages/{theme}/. The shadcn theme needs its assets:
make assets, or APP_THEME=shadcn php tests/Application/bin/console importmap:install (the Docker entrypoint does
it) followed by tailwind:build.
License
This bundle is released under the MIT License.