krystal-sf / ux-bootstrap-5
Bootstrap 5 for Krystal Symfony Projects
Package info
gitlab.com/krystal-sf/ux-bootstrap-5
Type:symfony-bundle
pkg:composer/krystal-sf/ux-bootstrap-5
Requires
- php: ^8.1
- krystal-sf/ux-common: ^1.0
- krystal-sf/ux-menus: ^1.0
- symfony/form: ^6.4|^7.4|^8.0
- webmozart/assert: ^1.0
Requires (Dev)
- badpixxel/php-sdk: ^3.0
- krystal-sf/ux-datatables: ^1.0
- krystal-sf/ux-metadata: ^1.0
- krystal-sf/ux-notify: ^1.0
- phpunit/phpunit: ^10.0|^11.0
- symfony/debug-bundle: ^6.4|^7.4|^8.0
- symfony/monolog-bundle: ^3.0|^4.0
- symfony/stopwatch: ^6.4|^7.4|^8.0
- symfony/web-profiler-bundle: ^6.4|^7.4|^8.0
Suggests
- krystal-sf/ux-datatables: Bootstrap 5 layout presets for Krystal Datatables
This package is auto-updated.
Last update: 2026-08-05 23:19:56 UTC
README
Bootstrap 5 integration for Krystal Symfony UX Projects: Twig & Live components, form types, Knp menus styling and presets dictionaries.
Installation
composer require krystal-sf/ux-bootstrap-5
Enable the bundle in config/bundles.php:
return [
// ...
Ksf\Plugins\Bootstrap5\KsfBootstrap5Bundle::class => ['all' => true],
];
Then import the loader once in your assets/app.js:
import "@krystal-sf/ux-bootstrap-5";
The loader exposes window.bootstrap, boots tooltips & popovers (with a
DOM observer for Live Components re-renders), Bootstrap Select and
Select2 (both jQuery based — jQuery is a peer dependency).
Twig Components
| Component | Usage |
|---|---|
Bootstrap:Alert | Alerts with presets (type & size) |
Bootstrap:Card | Cards with header/footer blocks & presets |
Bootstrap:Modal | Live modal (visible writable LiveProp) |
Bootstrap:Popover / Bootstrap:Tooltip | Styled popovers & tooltips |
Bootstrap:ProgressBar | Single or stacked progress bars |
<twig:Bootstrap:Card :presets="[ux.presets.cards.INFO]" title="Hello" />
Presets are expanded by tagged processors (Presets/) — styles map from
the shared ux.presets.* dictionaries of krystal-sf/ux-common.
Form Types
Bootstrap flavored types: BootstrapSelectType, Select2Type,
DateType, SwitchType, TouchIntegerType, ButtonGroupType,
SubmitType / ResetType (+ Live variants). A Bootstrap 5 form theme
is prepended automatically.
Knp Menus
Extensions & processors style Knp menus as Bootstrap buttons, dropdowns,
navbars and collapsible sidebars (ux.presets.buttons.* presets).
Testing
make up # boot the docker stack
make phpunit # run the test suite
make quality # lint + style + phpstan
License
MIT — see LICENSE.