Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ux Toggle Password

Ux Toggle Password Laravel Package

symfony/ux-toggle-password

Symfony UX TogglePassword adds an accessible show/hide control to password fields, letting users reveal what they type. It integrates with Symfony Forms and Twig, requires minimal setup, and offers a simple, user-friendly way to reduce password entry errors.

View on GitHub
Deep Wiki
Context7

Toggle visibility of password inputs for Symfony Forms

Frequently asked questions about Ux Toggle Password
Is symfony/ux-toggle-password a Laravel package?
No. It is a Symfony UX package built for Symfony Forms, Twig, and symfony/stimulus-bundle. The Composer package does not provide Blade directives, Laravel form helpers, or a Laravel service provider. In a Laravel app, only its small Stimulus controller is realistically reusable.
Can I use symfony/ux-toggle-password in a Laravel application?
Not as a direct Composer dependency. Installing it would pull in Symfony Form, Twig Bridge, and StimulusBundle, which do not fit Laravel's Blade and Vite stack. The practical route is to copy the Stimulus controller from vendor into resources/js/controllers, register it with your existing Stimulus setup, and render equivalent markup from a Blade component.
How do I install symfony/ux-toggle-password in Symfony?
Run composer require symfony/ux-toggle-password and make sure symfony/stimulus-bundle and an asset pipeline such as AssetMapper or Encore are configured. Then enable the form theme and build assets. The package auto-registers its Stimulus controller through controllers.json in a standard Symfony UX setup.
Does symfony/ux-toggle-password work with Laravel Blade?
No, the package ships a Twig form theme fragment, not Blade views. You would need to write your own Blade component that outputs the same markup contract: a password input plus a type button toggle with aria-pressed, aria-controls, and an accessible label. The Stimulus controller can still drive that markup once vendored.
What Laravel or Symfony versions does symfony/ux-toggle-password support?
There is no Laravel version support because it is not a Laravel package. For Symfony, it follows Symfony UX release lines and typically requires a supported Symfony Form version plus symfony/stimulus-bundle. Check the package composer.json for the exact PHP and Symfony constraints before adopting it.
How do I test the show/hide password toggle?
In Symfony, use a functional test that asserts the rendered form contains the toggle button with the expected data-controller and ARIA attributes, plus a browser test for the Stimulus behavior. In Laravel, write a Blade component test for the markup and a JavaScript or Dusk test that clicks the toggle and asserts the input type changes between password and text. Also verify keyboard focus and aria-pressed updates.
Is symfony/ux-toggle-password accessible?
The package provides ARIA attributes and a button-based control, which is a good starting point. You still need to verify with keyboard-only navigation and screen readers such as NVDA and VoiceOver. Icon-only toggle buttons need an accessible name, and the label should be localized if your app supports multiple languages.
Does toggling password visibility break password managers?
Changing an input type between password and text can interact with password managers and browser-native reveal controls. Test with common managers like 1Password and Bitwarden in your support matrix. Keep the input name, id, and autocomplete attributes stable so managers can still associate credentials correctly.
What are Laravel alternatives to symfony/ux-toggle-password?
For Laravel, a small custom Stimulus controller or Alpine.js component is usually the cheapest option. You can also use a lightweight npm package or build a Blade component with a few lines of JavaScript. Vendoring this package's controller is reasonable, but wrapping it as a Composer dependency is not.
Is symfony/ux-toggle-password actively maintained?
It is a small Symfony UX subpackage with limited community signals, so treat it as viable but dependent on Symfony's UX roadmap. For a Laravel codebase, maintenance is entirely on you once you vendor the controller. Pin the copied version, document its origin, and review it when Symfony UX releases major changes.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource