krystal-sf/ux-notify

Smart Notifications for Krystal Symfony Projects

Maintainers

Package info

gitlab.com/krystal-sf/ux-notify

Homepage

Issues

Type:symfony-bundle

pkg:composer/krystal-sf/ux-notify

Transparency log

Statistics

Installs: 1 856

Dependents: 2

Suggesters: 0

Stars: 0

1.0.x-dev 2026-08-04 23:04 UTC

This package is auto-updated.

Last update: 2026-08-04 23:04:52 UTC


README

Smart notifications for Krystal Symfony UX Projects: session flashes and live events rendered as toasts (ToastR).

PHP Version Symfony

Installation

composer require krystal-sf/ux-notify

Enable the bundle in config/bundles.php:

return [
    // ...
    Ksf\Plugins\Notify\KsfNotifyBundle::class => ['all' => true],
];

Usage

Add the Notify:Controller component once in your page template:

<twig:Notify:Controller />
  • Session flash messages are loaded & displayed automatically on page load.
  • Live Components actions: session alerts are parsed after each action.
  • Push a toast from anywhere with the NotifyFlashBagEvents::ADD live event.
  • Ajax flows can re-render session alerts by emitting the RENDER event.

Toast style & timeouts map from the alert type (success, warning, error, info) — presets in MessageProcessor. Errors are persistent (no timeout).

Testing

make up          # boot the docker stack
make phpunit     # run the test suite
make quality     # lint + style + phpstan

License

MIT — see LICENSE.