Back to library

Meter

Show a measurement within a known range, such as storage usage.

Storage used6.8 of 10 GB
6.8 of 10 GB

Recommended API

Property or elementTypeExample initial valueDescription
min, max, valueNumbers0, 10, 6.8Show a known amount relative to its range.
aria-labelTextStorage usedExplain what is being measured.

States

StateTriggerResult
measuredRender a current value.The bar fills to the position corresponding to that measurement.

Svelte implementation guidance

Show a measurement within a known range with an accessible name.

Use semantic HTML and preserve keyboard access. Adapt the example to the project conventions.

CSS variables

VariableTypeDefaultDescription
--q-textcolor #28302aMain text and foreground color.
--q-mutedcolor #70776fColor for secondary text.
--q-font-sizelength 13pxBase size for the component text.
--q-accentcolor #344e41Accent for active controls, indicators and focus.
--q-bordercolor #dce0d8Color for outlines and dividers.
--q-radiuslength 10pxBase corner radius.
--q-gaplength calc(var(--q-space) * 2)Space between items, based on the spacing unit.
--q-spacelength 4pxBase unit for gaps and padding.