Minimal Character Counter For Text Field – dCounts.js

Category: Form , Javascript | April 17, 2017
Authordetalhar
Last UpdateApril 17, 2017
LicenseMIT
Views695 views
Minimal Character Counter For Text Field – dCounts.js

dCounts.js is a really simple JavaScript library that displays character counter next to your text field and stops typing when you have reached the allowed character limit.

Install the dCounts.js via NPM:

npm install dcounts-js --save

How to use it:

Add the minified version of the dCounts.js to your html page.

<script src="dcounts-js.min.js"></script>

Initialize the dcounts on the target input field and set the limit as follow:

dcounts('input-box', 140);

You Might Be Interested In:


Leave a Reply