Open this example in the interactive library
Live preview
Source code
// components/PercentageMeter.tsx
export default function PercentageMeter({ value = 24 }: { value?: number } = {}) {
const pct = Math.min(100, Math.max(0, value));
return (
<label>
Utilization <meter min={0} max={100} value={pct} />
{pct}%
</label>
);
}
