sigilUI

Usage Gauge

Show current usage relative to a limit.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { UsageGauge } from "@sigil-ui/components";

Usage

<div className="flex w-full flex-wrap items-center justify-center gap-[var(--s-space-24)]">
    <UsageGauge value={42} max={100} label="Storage" />
    <UsageGauge value={78} max={100} label="CPU" />
    <UsageGauge value={95} max={100} label="Memory" />
  </div>

Props

PropTypeDefaultDescription
valuenumber——
maxnumber——
labelstring——
unitstring——
widthnumber——
heightnumber——
colorstring—Color of the filled arc. Defaults to primary, turns to error/warning at thresholds.
autoColorbooleantrueAuto-color based on usage percentage.

Token integration

CSS VariablePurpose
--s-primaryPrimary
--s-errorError
--s-warningWarning
--s-borderBorder
--s-textText
--s-font-monoFont mono
--s-text-mutedText muted