nowo-tech/password-toggle-bundle
A Symfony bundle that adds a show/hide password toggle to password fields, helping users verify their input, reduce typing errors, and improve form usability with a simple, lightweight integration.
nowo-tech/PasswordToggleBundle is a Symfony bundle, not a Laravel package: it ships a Twig form theme, a CSS file, and a small JS file that adds a show/hide ("eye") toggle to password fields. There is no service provider, no Blade directive, no config/password-toggle.php. Check the package type (symfony-bundle) and the README install snippet before planning anything.config/bundles.php, register the form theme in config/packages/twig.yaml (per the README), and include the shipped CSS/JS in your layout. Look first at: the README install block → the bundle's form theme template (as of v2.4.1 this is the authoritative source of the structural classes) → the toggle_container_classes config key.PasswordType field, render it with the bundle's form theme, and confirm in devtools that the wrapper carries input-group input-group-merge form-password-toggle and that the toggle button flips the input type.<x-password-input>). That's ~30 lines and avoids cross-framework coupling for a very small piece of behavior.input-group wrapper or you'll drift from the shipped CSS/JS contract.toggle_container_classes is merged on top of the template's structural classes (input-group input-group-merge form-password-toggle), with duplicates dropped. Use it for extra classes — margin utilities, design-system hooks — not for structural changes.input-group markup, a <button type="button"> toggle carrying aria-pressed, and a one-line JS listener. Keep the class names identical to the bundle's so you can swap back later.toggle_container_classes never removed form-password-toggle (it was hardcoded before too) — and it still doesn't. Only a template override changes the structure. The upgrade is otherwise markup-identical minus one redundant class.form-password-toggle or input-group* in a template override breaks the toggle with no error — just a dead button.type="button" element with a maintained aria-pressed state. The shipped markup handles this; hand-rolled ports usually forget it.toggle_container_classes (additive) → template override (structural) → replace the form theme entirely (different DOM contract). There's no event or PHP-level hook worth reaching for on a widget this small.How can I help you explore Laravel packages today?