PHPackages                             parfaitementweb/filament-password-input - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. parfaitementweb/filament-password-input

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

parfaitementweb/filament-password-input
=======================================

Enhanced password input component for filament.

v4.0.0(7mo ago)76.7k↓90.2%2[1 PRs](https://github.com/parfaitementweb/filament-password-input/pulls)MITPHPPHP ^8.2

Since Oct 19Pushed 7mo agoCompare

[ Source](https://github.com/parfaitementweb/filament-password-input)[ Packagist](https://packagist.org/packages/parfaitementweb/filament-password-input)[ Docs](https://github.com/parfaitementweb/filament-password-input)[ GitHub Sponsors](https://github.com/Parfaitementweb)[ RSS](/packages/parfaitementweb-filament-password-input/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (10)Versions (16)Used By (0)

filament-password-input
=======================

[](#filament-password-input)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7b2c0d157e7ac84b3dbd78e2163d333453b1b4a6bc5eea5653d3c363e490c910/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70617266616974656d656e747765622f66696c616d656e742d70617373776f72642d696e7075742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/parfaitementweb/filament-password-input)[![Tests](https://github.com/parfaitementweb/filament-password-input/workflows/Tests/badge.svg?style=flat-square)](https://github.com/parfaitementweb/filament-password-input/workflows/Tests/badge.svg?style=flat-square)[![Total Downloads](https://camo.githubusercontent.com/e8ce39a8723c7a6d2d0d13d46d307b0b77b639470a38127c4a86d92c613465e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70617266616974656d656e747765622f66696c616d656e742d70617373776f72642d696e7075742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/parfaitementweb/filament-password-input)[![PHP from Packagist](https://camo.githubusercontent.com/b9323e97bf87bb5f8197871634a7de1e3c8907a0290ba4add82eba90ee16dd7d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f70617266616974656d656e747765622f66696c616d656e742d70617373776f72642d696e7075743f7374796c653d666c61742d737175617265)](https://packagist.org/packages/parfaitementweb/filament-password-input)[![License](https://camo.githubusercontent.com/570da05746d07be1c2fc0e9a259baef8a602321c36d9b39c40cebfad45e3f7ea/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70617266616974656d656e747765622f66696c616d656e742d70617373776f72642d696e7075743f7374796c653d666c61742d737175617265)](https://github.com/parfaitementweb/filament-password-input/blob/main/LICENSE.md)

[![social image](https://camo.githubusercontent.com/c838b436676285e5325030b3083a0c4f16ea92c47c172da5d52cf830778747d8/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f46696c616d656e7425323050617373776f7264253230496e7075742e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d70617266616974656d656e7477656225324666696c616d656e742d70617373776f72642d696e707574267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d456e68616e6365642b70617373776f72642b696e7075742b636f6d706f6e656e742b666f722b66696c616d656e742e266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d6c6f636b2d636c6f736564)](https://camo.githubusercontent.com/c838b436676285e5325030b3083a0c4f16ea92c47c172da5d52cf830778747d8/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f46696c616d656e7425323050617373776f7264253230496e7075742e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d70617266616974656d656e7477656225324666696c616d656e742d70617373776f72642d696e707574267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d456e68616e6365642b70617373776f72642b696e7075742b636f6d706f6e656e742b666f722b66696c616d656e742e266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d6c6f636b2d636c6f736564)

`filament-password-input` is a package built for [Filament](https://filamentphp.com) that provides an enhanced password input form component that offers you the ability to add the following features to your password inputs:

- Reveal password toggle
- Copy to clipboard
- Generate new password button

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require parfaitementweb/filament-password-input
```

That's it. There is no configuration file or migrations necessary for the package. Any customization is done directly on the input itself, or [globally](#global-configuration) in a service provider, however there are a few language lines that can be overridden if necessary in your application. You may publish the language files with:

```
php artisan vendor:publish --tag=filament-password-input-translations
```

Usage
-----

[](#usage)

Inside a form schema, you can use the `Password` input like this:

```
use Parfaitementweb\FilamentPasswordInput\Password;
use Filament\Forms\Form;

public function form(Form $form): Form
{
    return $form
        ->schema([
            // ...
            Password::make('password')
                ->label('Password'),
        ]);
}
```

The code above will render a password input inside the form with a toggle button to show and hide the password.

[![base input](https://github.com/parfaitementweb/filament-password-input/raw/main/docs/images/base-input.png)](https://github.com/parfaitementweb/filament-password-input/raw/main/docs/images/base-input.png)

If you want to render a normal password input without the toggle, you may also do that with this field. The following code will render the password input without the toggle button inside it:

```
use Parfaitementweb\FilamentPasswordInput\Password;
use Filament\Forms\Form;

public function form(Form $form): Form
{
    return $form
        ->schema([
            // ...
            Password::make('password')
                ->label('Password')
                ->revealable(false),
        ]);
}
```

Copy to Clipboard
-----------------

[](#copy-to-clipboard)

You can easily make any password input copyable by calling the `copyable()` method on the input. This will merge an action button in with any other `suffixActions`you have defined on the input.

```
Password::make('password')
    ->copyable(),
```

[![copyable input](https://github.com/parfaitementweb/filament-password-input/raw/main/docs/images/input-with-copy.png)](https://github.com/parfaitementweb/filament-password-input/raw/main/docs/images/input-with-copy.png)

> **Note:** This button will not show up if the input is disabled.

If you'd like the copy button to show up as an inline suffix instead, you can simply call the `inlineSuffix()` method on the input.

### Icon Color

[](#icon-color)

You can customize the color of the icon by passing in a color to the `copyable` method:

```
Password::make('password')
    ->copyable(color: 'success'),
```

### Title/Label

[](#titlelabel)

When you hover over the copy button, a title saying `Copy to clipboard` will show up. You can customize this text globally by overriding the `filament-password-input::password.actions.copy.tooltip` language key.

### Confirmation Text

[](#confirmation-text)

Once clicked, a tooltip will appear with the text `Copied`. You can customize this text globally by overriding the `filament::components/copyable.messages.copied`language key, or individually by using the `copyMessage` method:

```
Password::make('password')
    ->copyable()
    ->copyMessage('Copied'),
```

### Copy Message Duration

[](#copy-message-duration)

The confirmation text that appears after clicking the copy button will disappear after 1 second by default. You can customize this with the `copyMessageDuration` method:

```
Password::make('password')
    ->copyable()
    ->copyMessageDuration(3000), // 3 seconds
```

> **Note:** The duration should be in milliseconds, and as an integer value.

Password Generation
-------------------

[](#password-generation)

Another feature offered by this component is password generation. By calling the `regeneratePassword()` method on the input, a button will be merged in with any other `suffixActions` you have defined on the input.

```
Password::make('password')
    ->label('Password')
    ->regeneratePassword(),
```

[![regenerate password](https://github.com/parfaitementweb/filament-password-input/raw/main/docs/images/input-with-generate.png)](https://github.com/parfaitementweb/filament-password-input/raw/main/docs/images/input-with-generate.png)

> **Note:** This button will not show up if the input is disabled or readonly.

As with the copy to clipboard action button, you can have this action rendered inline on the input as well by calling the `inlineSuffix()` method on the input.

### Password Generation Method

[](#password-generation-method)

By default, the password generation is handled with Laravel's `Str::password()` helper method. This will generate a random, strong password that is 32 characters long for you. If you have a `maxLength()` set on the input, that length will be used instead for the character length.

You may also use a completely custom generation method by providing a closure to the `regeneratePassword` method:

```
Password::make('password')
    ->regeneratePassword(using: fn () => 'my-custom-password'),
```

Now when the button is clicked, `my-custom-password` will be filled into the input instead. Like with most callbacks in filament, you are able to inject filament's utilities into the callback as well.

### Password Max Length

[](#password-max-length)

When using the default password generator (`Str::password()`), we will tell it to use the `maxLength()` that is set on the input. This means that if you set a maximum length of 10 characters, the password generated by this action will be 10 characters long. By default, it is 32 characters long if a max length is not set.

```
Password::make('password')
    ->regeneratePassword()
    ->maxLength(10),
```

> **Note:** Due to how Laravel's `Str::password()` helper works, the password max length must be a minimum of 3 characters long.

If you want to use a different length than the input's max length, you can also use the `newPasswordLength` method as well:

```
Password::make()
    ->regeneratePassword()
    ->newPasswordLength(8),
```

### Icon Color

[](#icon-color-1)

You can customize the color of the icon by passing a color to the `regeneratePassword` method:

```
Password::make('password')
    ->regeneratePassword(color: 'success'),
```

### Title/Label

[](#titlelabel-1)

When you hover the generate password action button, the text `Generate new password` will show up. You can customize this text globally by overriding the `filament-password-input::password.actions.regenerate.tooltip` language key.

### Confirmation Message

[](#confirmation-message)

Once a new password is generated and returned to the UI, the component will make use of a filament `Notification` with the text `New password was generated!`. You can customize this globally by overriding the `filament-password-input::password.actions.regenerate.success_message` language key.

You may also disable this notification all-together by providing a `false` value to the `regeneratePassword` method:

```
Password::make('password')
    ->regeneratePassword(notify: false),
```

Password Managers
-----------------

[](#password-managers)

If you have a password manager installed, like 1Password or LastPass, you'll know that they automatically inject a button into password inputs. Normally, this is a good thing, but there can be times when this is not desired, such as in local development or on a form where you're inputting something other than your own password.

To disable password managers from injecting themselves into your password inputs, you may use the `hidePasswordManagerIcons()` method:

```
Password::make('password')
    ->hidePasswordManagerIcons(),
```

This will add `data-1p-ignore` and `data-lpignore="true"` attributes to the input to attempt to block password managers from injecting their buttons. This isn't always 100% effective, but it should work in most cases. If you know of a better way to handle this, PR's are always welcome.

Icons
-----

[](#icons)

The icons for used in the actions on this component can be customized in a service provider by registering their aliases with filament.

```
\Filament\Support\Facades\FilamentIcon::register([
    'filament-password-input::regenerate' => 'heroicon-o-key',
])
```

Here are the aliases required to modify each icon:

- `filament-password-input::copy` - copy to clipboard action
- `filament-password-input::regenerate` - regenerate password action
- `forms::components.text-input.actions.show-password` - show password reveal button
- `forms::components.text-input.actions.hide-password` - hide password reveal button

Kitchen Sink Example
--------------------

[](#kitchen-sink-example)

Here is an example of an input with all the actions enabled:

```
Password::make('password')
    ->label('Password')
    ->copyable(color: 'warning')
    ->regeneratePassword(color: 'primary')
    ->inlineSuffix(),
```

[![kitchen sink](https://github.com/parfaitementweb/filament-password-input/raw/main/docs/images/kitchen-sink.png)](https://github.com/parfaitementweb/filament-password-input/raw/main/docs/images/kitchen-sink.png)

Global Configuration
--------------------

[](#global-configuration)

Like most things in filament, you can customize a lot of the default behavior of this input in a service provider using `configureUsing`:

```
use Parfaitementweb\FilamentPasswordInput\Password;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        Password::configureUsing(function (Password $password) {
            $password
                ->maxLength(24)
                ->copyable();
                // ->...
        });
    }
}
```

Any behavior defined here can still be overridden on individual inputs as needed.

Scripts
-------

[](#scripts)

### Setup

[](#setup)

For convenience, you can run the setup bin script for easy installation for local development.

```
./bin/setup.sh
```

### Formatting

[](#formatting)

Although formatting is done automatically via workflow, you can format php code locally before committing with a composer script:

```
composer format
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](https://github.com/parfaitementweb/filament-password-input/blob/main/CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/parfaitementweb/filament-password-input/blob/main/.github/CONTRIBUTING.md) for details.

Security
--------

[](#security)

Please review [my security policy](https://github.com/parfaitementweb/filament-password-input/blob/main/.github/SECURITY.md) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Randall Wilk](https://github.com/parfaitementweb)
- [All Contributors](https://github.com/parfaitementweb/filament-password-input/graphs/contributors)

Alternatives
------------

[](#alternatives)

- [papalardo/filament-password-input](https://github.com/papalardo/filament-password-input)
- [phpsa/filament-password-reveal](https://github.com/phpsa/filament-password-reveal)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/parfaitementweb/filament-password-input/blob/main/LICENSE.md) for more information.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance62

Regular maintenance activity

Popularity32

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 68.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~58 days

Recently: every ~141 days

Total

13

Last Release

231d ago

Major Versions

v1.1.3 → v2.0.02024-01-22

v1.x-dev → v2.0.12024-03-05

v2.1.0 → v4.0.02025-09-22

PHP version history (4 changes)v1.0.0PHP ^8.1|^8.2|^8.3

v2.0.3PHP ^8.1|^8.2|^8.3|^8.4

v2.1.0PHP ^8.1

v4.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/67c747d82e5989eeae3f98ae775f6e9d9aaee286e221e9f35a446e0f440421a8?d=identicon)[parfaitementweb](/maintainers/parfaitementweb)

---

Top Contributors

[![rawilk](https://avatars.githubusercontent.com/u/22842525?v=4)](https://github.com/rawilk "rawilk (95 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (13 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (10 commits)")[![Jacobtims](https://avatars.githubusercontent.com/u/75219092?v=4)](https://github.com/Jacobtims "Jacobtims (7 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (5 commits)")[![AlexisSerneels](https://avatars.githubusercontent.com/u/287688?v=4)](https://github.com/AlexisSerneels "AlexisSerneels (3 commits)")[![Corvisier](https://avatars.githubusercontent.com/u/202424?v=4)](https://github.com/Corvisier "Corvisier (2 commits)")[![EG-Mohamed](https://avatars.githubusercontent.com/u/23424932?v=4)](https://github.com/EG-Mohamed "EG-Mohamed (1 commits)")[![klaare](https://avatars.githubusercontent.com/u/170330296?v=4)](https://github.com/klaare "klaare (1 commits)")[![patriciomartinns](https://avatars.githubusercontent.com/u/20000058?v=4)](https://github.com/patriciomartinns "patriciomartinns (1 commits)")

---

Tags

laraveluipasswordFormsfilamentParfaitementwebfilament-password-input

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/parfaitementweb-filament-password-input/health.svg)

```
[![Health](https://phpackages.com/badges/parfaitementweb-filament-password-input/health.svg)](https://phpackages.com/packages/parfaitementweb-filament-password-input)
```

###  Alternatives

[rawilk/filament-password-input

Enhanced password input component for filament.

52232.4k3](/packages/rawilk-filament-password-input)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

320392.1k17](/packages/codewithdennis-filament-select-tree)[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

58289.3k3](/packages/creagia-filament-code-field)[ralphjsmit/laravel-filament-components

A collection of reusable components for Filament.

10972.2k2](/packages/ralphjsmit-laravel-filament-components)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
