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
Filament Character Counter

Filament Character Counter Laravel Package

schmeits/filament-character-counter

Easy drop-in Filament character counter for TextField, Textarea and RichEditor fields in Filament v4 and v5. Add a characterLimit or maxLength to display a live character count, optionally shown inside the control. Translation strings are publishable, and v3.2 is supported via 1.x.

View on GitHub
Deep Wiki
Context7

Filament Character Counter adds a live character counter to TextField, Textarea, and RichEditor form components in Filament v4 and v5. It helps editors track content length with a configurable characterLimit() or the native maxLength(), and can display the counter inside the input control via showInsideControl().

  • Works with Filament v4 and v5
  • Use characterLimit(50) or maxLength(50)
  • Show counter inside controls with showInsideControl(true)
  • Publishable translations for separator and label
  • Compatible with TextInput, Textarea, and RichEditor
Frequently asked questions about Filament Character Counter
How do I install the schmeits/filament-character-counter package in Laravel?
Install it with Composer using composer require schmeits/filament-character-counter:^5.0. It requires PHP 8.2 or higher and Filament 4.x or 5.x. Optionally publish the translation file with php artisan vendor:publish --tag=filament-character-counter-translations. No migrations or service provider setup are required.
Which Filament and Laravel versions does this character counter support?
Version 5.x supports Filament 4.x and 5.x on PHP 8.2+, with CI coverage for Laravel 11 and 12. Older Filament 3.2 projects should use the 1.x release line. Pin ^5.0 in composer.json and commit your lockfile, and do not mix 1.x and 5.x in the same codebase.
How do I add a live character counter to a Filament TextInput or Textarea?
Replace the native Filament field import with the package's TextInput or Textarea component, then call characterLimit(50) for example. The counter updates live as the user types and can be placed inside the control with showInsideControl(true). You only need to opt in on the fields where you want the counter.
What is the difference between characterLimit() and maxLength() in this package?
characterLimit() adds a live counter and is effectively a soft UX limit, not a hard enforcement mechanism. maxLength() applies the hard maximum through the field's maxlength behavior and validation. You do not need both on the same field. For compliance or API constraints, still validate the value server-side with Laravel rules.
Does the character counter work correctly with Filament's RichEditor?
Yes, the package includes a RichEditor component, but this is the most fragile surface because counting is DOM-based against rendered editor content and uses a Livewire commit hook. RichEditor has needed fixes before and is the most likely area to break on Filament upgrades. Also verify what your server-side max rule counts for RichEditor, since stored HTML and visible text can differ.
Is the character limit enforced server-side by this package?
No, the counter is client-side UX feedback and should not be treated as enforcement. Use maxLength() where appropriate and always add Laravel validation for any hard limit. This matters for API constraints, compliance requirements, and any data that can be submitted outside the browser.
How do I translate or customize the character counter label?
Publish the translations with php artisan vendor:publish --tag=filament-character-counter-translations, then edit character_label and character_seperator. Be aware the published key contains a typo, character_seperator, so keep that spelling when overriding it. Locale QA for RTL, French, German, Dutch, or Arabic is your responsibility.
Can I show the character counter inside the input control?
Yes, chain showInsideControl(true) on the field alongside characterLimit(). This places the counter within the component rather than below it, which is useful for compact forms. It works with the package's TextInput, Textarea, and RichEditor components.
Does this package work with Filament SPA mode and Livewire 3 or 4?
The package claims support for Livewire 3 and 4 and has included fixes for async Alpine loading in SPA mode. Because the RichEditor counter depends on DOM structure and Livewire commit hooks, test it in your actual SPA panel before rollout. If your panel uses SPA navigation, include a quick create, edit, and refresh check in QA.
Is schmeits/filament-character-counter safe to use in production?
It is a small, low-blast-radius presentation package with no migrations or data model, so it is easy to fork or remove. The main risk is supplier concentration: it has a single maintainer and limited ecosystem validation. Pin the version, commit the lockfile, add it to your Filament major upgrade checklist, and define a fork trigger if upstream goes quiet.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections