StealThis .dev

Coworking — Credits Balance

A warm, industrial members-area widget that shows a coworking member's monthly credits at a glance. An animated circular meter tracks remaining versus plan, a breakdown panel splits the allowance across meeting rooms, print units, guest passes and locker hours, and a filterable usage history lists recent spends and top-ups. A top-up modal lets members pick a credit bundle and instantly raises the balance, with toast confirmation. Built with plain HTML, CSS and vanilla JS.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Credits Balance

A self-contained members-area panel for a fictional coworking studio, Foundry & Fern. The hero card is an animated circular meter that counts up to the member’s remaining monthly credits, with a legend breaking out used, remaining and plan totals. The stroke colour shifts from amber to warning to danger as the balance runs low, so members can read their status without parsing numbers.

Alongside the meter, an allowance breakdown lists how each credit pool is being spent — meeting rooms, print and scan units, guest day passes and locker hours — each with a progress bar. A usage history list shows recent activity and can be filtered to all entries, spends only, or top-ups only via a segmented control.

Tapping Top up credits opens an accessible modal with three selectable bundles. Confirming a bundle animates the meter up to the new balance, prepends a fresh entry to the history, and fires a toast. The modal traps Escape-to-close, restores focus, and the whole layout reflows cleanly down to a 360px phone width.

Illustrative UI only — fictional coworking space, not a real booking system.