Download the PHP package nowo-tech/password-toggle-bundle without Composer

On this page you can find all versions of the php package nowo-tech/password-toggle-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package password-toggle-bundle

Password Toggle Bundle

CI Packagist Version Packagist Downloads

⭐ Found this useful? Give it a star on GitHub! It helps us maintain and improve the project.

Symfony bundle providing a password form type with toggle visibility feature.

This bundle is FrankenPHP worker mode friendly.

Features

Installation

Then, register the bundle in your config/bundles.php:

Note: If you're using Symfony Flex, the bundle will be registered automatically and a default configuration file will be created at config/packages/nowo_password_toggle.yaml.

Requirements

If those packages are missing, the toggle still works but icons are omitted; see docs/INSTALLATION.md.

Configuration

When installed via Symfony Flex, a default configuration file is automatically created at config/packages/nowo_password_toggle.yaml. If you're not using Flex or the file wasn't created, you can create it manually.

You can configure default values for all password fields in config/packages/nowo_password_toggle.yaml:

These defaults will be used for all PasswordType instances unless overridden when using the form type directly.

Usage

Basic Usage

With Options

Available Options

All options can be configured globally in config/packages/nowo_password_toggle.yaml or overridden per field when using the form type.

Note: All options are validated for correct types. Invalid values will throw exceptions with clear error messages.

Option Type Default Description
toggle bool true Enable/disable toggle functionality. When false, renders a simple password input without toggle button
visible_icon string 'tabler:eye-off' Icon when password is hidden (must be non-empty)
hidden_icon string 'tabler:eye' Icon when password is visible (must be non-empty)
visible_label string 'Show' Label when password is hidden (must be non-empty)
hidden_label string 'Hide' Label when password is visible (must be non-empty)
button_classes array ['input-group-text', 'cursor-pointer'] CSS classes for toggle button (must be an array)
toggle_container_classes array ['form-password-toggle'] CSS classes for container (must be an array)
use_toggle_form_theme bool true Use the bundle's form theme for rendering
always_empty bool true Always render empty value
trim bool false Trim whitespace
invalid_message string 'The password is invalid.' Invalid message (must be non-empty)

Disabling Toggle

You can disable the toggle functionality for a specific field:

When toggle is false, the field renders as a standard password input without the toggle button, making it compatible with any styling or JavaScript framework.

Styling

The bundle includes CSS/SCSS styles for the toggle button. You can use them by:

Option 1: Include the CSS file

Option 2: Use the SCSS file

If you're using a build system (Webpack Encore, Vite, etc.), import the SCSS:

Option 3: Custom styles

The bundle uses these CSS classes that you can style:

Example custom styles:

Demo Projects

The bundle includes three demo projects demonstrating usage with different Symfony and PHP versions:

Each demo is independent and includes:

Quick Start with Docker

Or start any other demo:

See demo/README.md for detailed instructions for all demos.

Development

Using Docker (Recommended)

Without Docker

Code Quality

The bundle uses PHP-CS-Fixer to enforce code style (PSR-12).

CI/CD

The bundle uses GitHub Actions for continuous integration:

See .github/workflows/ci.yml for details.

Documentation

Additional documentation

Testing

The bundle targets ≥95% code coverage (CI minimum); current suite is at 100%. All tests are located in the tests/ directory.

Running Tests

Test Structure

All classes and methods are fully tested with 100% code coverage.

Tests and coverage

License

The MIT License (MIT). Please see LICENSE for more information.

Contributing

Please see docs/CONTRIBUTING.md for details on how to contribute to this project.

For information about branching strategy and versioning, see docs/BRANCHING.md.

Author

Created by Héctor Franco Aceituno at Nowo.tech


All versions of password-toggle-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2 <8.6
symfony/form Version ^7.0 || ^8.0
symfony/framework-bundle Version ^7.0 || ^8.0
symfony/twig-bundle Version ^7.0 || ^8.0
twig/extra-bundle Version ^3.12
twig/string-extra Version ^3.12
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nowo-tech/password-toggle-bundle contains the following files

Loading the files please wait ...