This guide covers installing Ui Kit Bundle in a Symfony application.
- PHP
>=8.1(<8.6). Symfony 8.0 and 8.1 require PHP 8.4+. - Symfony
^6.0 || ^7.0 || ^8.0— CI mandatory minors: 7.4, 8.0, 8.1. - Twig 3.8+ (via
symfony/twig-bundle).
| Symfony | Minimum PHP (bundle) | Minimum PHP (Symfony) |
|---|---|---|
| 6.x / 7.0–7.3 | 8.1 | as per Symfony |
| 7.4 | 8.2 | 8.2 |
| 8.0 | 8.4 | 8.4 |
| 8.1 | 8.4 | 8.4 |
composer require nowo-tech/ui-kit-bundlePackagist: nowo-tech/ui-kit-bundle.
The recipe stub under .symfony/recipe/nowo-tech/ui-kit-bundle/1.0/ registers the bundle and copies config/packages/nowo_ui_kit.yaml. There are no routes (Ui Kit is Twig/CSS/JS only). See RECIPE.md. Until the recipe is published on symfony/recipes-contrib, register manually as below.
- Register the bundle in
config/bundles.php:
<?php
return [
// ...
Nowo\UiKitBundle\NowoUiKitBundle::class => ['all' => true],
];- Create configuration
config/packages/nowo_ui_kit.yaml:
nowo_ui_kit:
css_framework: bootstrap5
icon_set: bootstrap-icons
row_actions_display: iconSee Configuration for all enum values.
php bin/console assets:installThis publishes src/Resources/public to public/bundles/nowouikit/ (css/nowo-ui.css, js/nowo-ui-modal.js, js/nowo-ui-shell.js). Templates load them via the nowo_ui_kit asset package:
<link rel="stylesheet" href="{{ asset('css/nowo-ui.css', 'nowo_ui_kit') }}">
<script defer src="{{ asset('js/nowo-ui-modal.js', 'nowo_ui_kit') }}"></script>
<script defer src="{{ asset('js/nowo-ui-shell.js', 'nowo_ui_kit') }}"></script>The bundle registers the nowo_ui_kit asset package (base_path: /bundles/nowouikit). Run assets:install once so public files are published. Do not hard-code /bundles/nowouikit/... paths in host layouts.
Contributors rebuild frontend assets with:
make assetsThis package ships Twig templates. Host applications must install and enable Twig Extra:
composer require twig/extra-bundle twig/string-extraRegister Twig\Extra\TwigExtraBundle\TwigExtraBundle in config/bundles.php (Flex usually does this). Demos already include the same stack. The package release-check runs make check-twig-extra to guard this contract.