schmeits / filament-character-counter
This is a Filament character counter TextField and Textarea form field for Filament v4 and v5
Fund package maintenance!
schmeits
Installs: 162 187
Dependents: 5
Suggesters: 0
Security: 0
Stars: 33
Watchers: 2
Forks: 15
Open Issues: 1
Language:Blade
pkg:composer/schmeits/filament-character-counter
Requires
- php: ^8.2
- filament/filament: ^4.0|^5.0
- filament/forms: ^4.0|^5.0
- spatie/laravel-package-tools: ^1.19.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^8.1
- nunomaduro/larastan: ^2.9
- orchestra/testbench: ^v9.0
- pestphp/pest: ^3.7
- pestphp/pest-plugin-arch: ^v3.1
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.36
- dev-main
- v5.0.0
- 4.0.0
- v4.0.0-beta2
- v4.0.0-beta1
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.0
- dev-dependabot/github_actions/dependabot/fetch-metadata-2.5.0
- dev-dependabot/github_actions/actions/checkout-6
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-7
- dev-dependabot/github_actions/actions/checkout-5
- dev-dependabot/github_actions/aglipanci/laravel-pint-action-2.6
- dev-filament-4
- dev-dependabot/npm_and_yarn/axios-1.11.0
- dev-dependabot/npm_and_yarn/form-data-4.0.4
This package is auto-updated.
Last update: 2026-01-30 14:35:51 UTC
README
This is a Filament character counter TextField, Textarea and RichEditor form field for Filament v4 and v5.
If you want to use this package with Filament v3.2 see version 1.x.
Installation
| Plugin Version | Filament Version | PHP Version |
|---|---|---|
| 1.x | 3.2 | > 8.1 |
| 4.x | 4.x | > 8.2 |
| 5.x | 4.x - 5.x | > 8.2 |
You can install the package via composer:
composer require schmeits/filament-character-counter:"^5.0"
Note
- For Filament v4 or v5, use version
^5.0- For Filament v3.2, use version
^1.0
You can publish the translations file with:
php artisan vendor:publish --tag="filament-character-counter-translations"
This is the contents of the published translation file:
return [ 'character_seperator' => ' / ', 'character_label' => 'characters', ];
Usage
use Schmeits\FilamentCharacterCounter\Forms\Components\TextInput; use Schmeits\FilamentCharacterCounter\Forms\Components\Textarea; TextInput::make('title') ->characterLimit(50), Textarea::make('description') ->characterLimit(155), RichEditor::make('content') ->characterLimit(155),
maxLength can also be used to limit the maximum number of characters, there is no need to specify the characterLimit as well.
TextInput::make('title') ->maxLength(50),
As an additional option, you can place the counter within your component using:
TextInput::make('title') ->showInsideControl(true) ->characterLimit(50),
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Tally Schmeits
- Inspired on the package by Wiebe Nieuwenhuis
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
