atefrihane / livewire-password-meter
A package dedicated to check password strength
1.0.1
2023-02-08 00:44 UTC
Requires
- php: ^8.1
- bjeavons/zxcvbn-php: ^1.3
- illuminate/contracts: ^9.0
- livewire/livewire: ^2.11
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
README
This repo can be used to easily integrate password strength feature to your livewire application
Installation
You can install the package via composer:
composer require atefrihane/livewire-password-meter
This package also depends on Alpine.js
Install it from here.
<script src="//unpkg.com/alpinejs" defer></script>
Screenshot
Usage
<livewire:password-field :wireKey="'password'" :class="'your-css-class'" :styles="'inline css styles'" :placeholder="'placeholder'" :eyeIcon="true" :showStrength="true" />
Props
Prop | Description |
---|---|
wireKey | Key passed from the main livewire component (e.g., password) |
placeholder | Input's placeholder |
eyeIcon | Toggle the display of the password text between masked (hidden) and visible. |
showStrength | Provides feedback to the user on the strength or security of the password they have entered (default = false) |
class | Pass CSS classes to the component |
styles | Pass inline CSS to the component |
Config
Optionally you can publish config files which can be used to override feedback messages
php artisan vendor:publish --provider="Atef\LivewirePasswordMeter\LivewirePasswordMeterServiceProvider" --tag="livewire-password-config"
Testing
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.m