Character or word counters should be used if there is a character or word limit. They display the ratio of characters used and the total character limit.
Material Design guidelines: Text-fields - Assistive elements
Material Components for the web: Text Field
Bootstrap Maxlength: Official documentation
This plugin doesn’t require extra CSS loading but jQuery is required.
Demo
Helper message.
Using Maxlength
Import Bootstrap Maxlength after your Material JavaScripts.
Add a maxlength
attribute to your input field.
Initialize plugin once. Here is an example of simplest declaration to be active on all inputs with maxlength attribute set and material design style.
All parameters are detailed in Bootstrap maxlength official documentation.
That’s it.