remold/ui

Usage meter

A plan's usage on a billing page: bars fill as the month goes on, turn amber when you're running low and red once you're over, and upgrading makes every bar spring back down.

MotionBase UI

UsageProResets in days
  • API requests / 100,000
    x
  • Bandwidth GB / 100 GB
    x
  • Storage GB / 10 GB
    x
  • Seats / 5
    x
Projected bill
  • Pro plan
  • API overage · 11,600 requests

Things to try

  • Watch the month go by. The bars fill, turn amber when you're running low and red once you're over.
  • Look at the bill. The overage slides into the projected bill.
  • Upgrade. The new limits make every bar spring back down while the warnings fold away.
  • Point at the ⓘ beside a meter to see what it counts and what going over costs.

Install

npx shadcn@latest add https://your-docs-site/r/usage-meter.json

Dependencies

The install command adds these for you. If you copy the code by hand, install them yourself.

npm install @base-ui/react @hugeicons/core-free-icons @hugeicons/react @remold-ui/react motion

How it works

  • Each bar is Base UI's Meter, so it carries the right role and values for assistive tech; the details are Base UI's Tooltip.
  • The fills, colours and folding warnings are Motion, and the numbers roll with a small odometer.
The plans and prices are made up.

On this page