
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);






