Fork me on GitHub

Char Counter

<form class="form-inline">
    <input id="myInput" class="form-control" type="text">
    <label class="control-label">
        <span id="myCounter"></span> character(s) remaining
    </label>
</form>
YUI().use(
  'aui-char-counter',
  function(Y) {
    new Y.CharCounter(
      {
        counter: '#myCounter',
        input: '#myInput',
        maxLength: 10
      }
    );
  }
);