</> ConvertAtlas Developer Tools
Bootstrap 5 · Intermediate

Character Ring Counter

A textarea with a circular remaining-character ring counter.

Requires Bootstrap 5. Add the CDN tags below to your page (styles in <head>, scripts before </body>). The downloaded file already includes them.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<div class="card border-0 shadow-sm" style="max-width:340px"><div class="card-body">
  <label class="form-label small fw-semibold">Tweet</label>
  <textarea class="form-control" id="twArea" rows="3" placeholder="What's happening?"></textarea>
  <div class="d-flex justify-content-end align-items-center gap-2 mt-1"><div class="position-relative" style="width:24px;height:24px"><svg width="24" height="24" style="transform:rotate(-90deg)"><circle cx="12" cy="12" r="10" fill="none" stroke="#e9ecef" stroke-width="2"/><circle id="twRing" cx="12" cy="12" r="10" fill="none" stroke="#0d6efd" stroke-width="2" stroke-dasharray="63" stroke-dashoffset="63"/></svg></div><small id="twCount" class="text-secondary">280</small></div>
</div></div>
var a=document.getElementById('twArea'),ring=document.getElementById('twRing'),cnt=document.getElementById('twCount'),max=280;
a.addEventListener('input',function(){var left=max-a.value.length;cnt.textContent=left;cnt.className=left<20?'text-danger':'text-secondary';ring.style.strokeDashoffset=63-(63*a.value.length/max);ring.style.stroke=left<20?'#dc3545':'#0d6efd'});
Free to use.This component uses Bootstrap 5 (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.