Data Display

QuotaMeter

Meter composition for quota usage with a visible figure, hard or fair-use limits, and reset and unlimited states.

import { QuotaMeter } from '@lostgradient/cinder';
quota-meter
01

Overview

Reference usage

QuotaMeter presents quota usage, limits, reset dates, and unlimited states through Meter.

Usage

svelte
<script lang="ts">
  import { QuotaMeter } from '@lostgradient/cinder';
</script>

<QuotaMeter used={72} />

The label and a figure such as "72 of 100" sit above the bar, and numbers are formatted for the locale. Pass labelVisible={false} when a heading next to the meter already names it; the label stays the meter's accessible name.

A hard limit stops something when it is reached, so the bar fills in the danger tone. A fair-use guide stops nothing: pass limitKind="soft" and the figure reads "of about", and going past it fills the bar in the warning tone and adds "2,400 over" to the accessible value. Put what going over means in children, under the bar.

svelte
<script lang="ts">
  import { QuotaMeter } from '@lostgradient/cinder';
</script>

<QuotaMeter
  used={12_400}
  limit={10_000}
  limitKind="soft"
  label="Emails sorted"
  resetsAt="2026-12-01"
>
  Past the guide. Sorting carries on, and nothing extra is charged.
</QuotaMeter>

data-cinder-quota-state on the root is under, over (usage at or past the limit) or unlimited, and data-cinder-limit-kind is hard or soft.

Live preview

QuotaMeter

Quota

02

When to use

Use when
  • Showing usage against a plan or account limit.
Avoid when
  • Showing task completion.
03

Examples

QuotaMeter

Show finite quota consumption with an accessible value summary.

04

Props

Props for quota-meter
Name
Type
Default
Description
used number 0 Amount used so far. Non-finite and negative values are treated as zero.
limit number 100 The quota's limit. A non-positive or non-finite limit falls back to 100.
limitKind 'hard' | 'soft' 'hard' How the limit behaves once usage reaches it. hard stops something, so reaching it fills the bar in the danger tone. soft is a fair-use guide that never stops anything: the figure reads "of about", and going past it fills the bar in the warning tone and says how far over it is.
resetsAt text When usage resets. Included in the accessible value text.
locale text BCP-47 locale used for numbers and the reset date. Defaults to LocaleProvider, then the runtime locale.
timeZone text 'UTC' IANA time zone used for the reset date.
unlimited boolean false Usage has no limit: no track is drawn, and the label row becomes a group that reads the amount used.
label text 'Quota' What is being measured, such as "Emails sorted".
labelVisible boolean true Whether to render the label and the figure ("7,940 of about 10,000") above the bar. When false the label is only the meter's accessible name.
children snippet Supporting text under the bar, such as what happens past the limit.