Web component / unpkg

<form-maxlength-progress>

README and API documentation

Guarded definition helper and overrun

This page loads the guarded definition helper from unpkg. The field allows overrun and receives aria-invalid="true" above its limit. Remaining and over-limit text, contrasting state colors, and a thicker field boundary supplement native semantics. Without JavaScript or if the CDN fails, the labeled field and native maxlength enforcement remain. aria-invalid presents the exceeded state but doesn’t block form submission.

<label for="unpkg-message">Message</label>
<textarea id="unpkg-message" maxlength="30"></textarea>
<form-maxlength-progress for="unpkg-message" overrun="true">
</form-maxlength-progress>

import { defineFormMaxlengthProgress } from
  'https://unpkg.com/@aarongustafson/form-maxlength-progress@latest/define.js?module';
defineFormMaxlengthProgress();