Skip to content
Browse library
BIU UI/Components/Usage Meter
COMPONENTSPro

Usage Meter

Explore the Usage Meter component and try its interactive examples.

INTERACTIVE PREVIEW

Preview

Loading preview…
GET STARTED

Installation

BIU UI ProEarly Access · Coming Soon
Usage Meter source is part of BIU UI Pro

The interactive preview and API reference are open to try right here. Full single-file TSX source and @biudev-pro/usage-meter shadcn Registry installs are reserved for BIU UI Pro. Meanwhile, all 41 core components and 2 starter blocks are free and open source under MIT.

npx shadcn@latest add @biudev-pro/usage-meter

Usage

Start with this example, then adjust the import path for your project.

EXAMPLE / TSX
import { UsageMeter } from "@/components/ui/biu/usage-meter";

export function Example() {
  return (
    <UsageMeter
      label="Context window"
      max={200000}
      valueLabel="142.4K / 200K"
      segments={[
        { id: "sys", label: "System", value: 24200, color: "#6366f1" },
        { id: "chat", label: "Chat", value: 118200, color: "#0ea5e9" },
      ]}
    />
  );
}

Examples

Try each example or switch to its code.

API reference

Properties and defaults from the component source. An asterisk marks a required property; a dash means no explicit default.

UsageMeterSegment

UsageMeterProps

Source

BIU UI ProEarly Access · Coming Soon
Usage Meter source is part of BIU UI Pro

The interactive preview and API reference are open to try right here. Full single-file TSX source and @biudev-pro/usage-meter shadcn Registry installs are reserved for BIU UI Pro. Meanwhile, all 41 core components and 2 starter blocks are free and open source under MIT.

npx shadcn@latest add @biudev-pro/usage-meter