MeterGroup
Multiple scalar measurements inside one known range, rendered as a compact visual composition without sacrificing the identity and value of each meter.
STANDALONE API
Import
Import the canonical component and immutable item contract from the granular entry point.
Storage composition
Every segment owns its visible label, optional Neural Icon, formatted value and assistive value text.
- Applications 24 GB
- Media 36 GB
- System 18 GB
Signal-driven values
Replace immutable items and only the computed geometry changes. Segment transitions respect reduced motion.
- Applications 24 GB
- Media 36 GB
- System 18 GB
Custom shared range and colors
Values are normalized against one shared range. Item colors override the six-color token palette without mutating source data.
- Web 42 GB
- Mobile 28 GB
- API 16 GB
Vertical and logical layout
Orientation, label position and label flow are independent. Start and end remain correct in RTL.
- CPU 38%
- Memory 31%
- Queue 19%
Label and value visibility
Move labels before the track, hide formatted values or remove the visible legend entirely. Hidden legends become direct accessible meter names.
- Web 42%
- Mobile 28%
- API 16%
- Web
- Mobile
- API
Capacity clipping without data loss
When totals exceed the track, later segments use only remaining visual capacity. Their real bounded values remain available through ARIA instead of being rewritten.
- Reserved 72%
- Requested 48%
- Burst 20%
Unstyled and typed slots
Structural sizing and meter semantics remain while Tailwind owns every visible choice.
- CPU 38%
- Memory 31%
- Queue 19%
MeterGroup or ProgressBar?
Known scalar measurements such as storage composition, quotas, scores and resource allocation.
A task moving toward completion or an indeterminate operation. It communicates progress, not composition.
ACCESSIBILITY
Every segment keeps its meaning
Meter semantics
The container is a named group. Every item uses role="meter" with bounded aria-valuemin, aria-valuemax and aria-valuenow.
Names and human values
Visible labels are connected using stable aria-labelledby IDs. With labels hidden, each meter receives a direct name. Use valueText for units or domain meaning such as “24 gigabytes used”.
Motion and RTL
Logical dimensions and positions follow document direction. Segment transitions are removed when the operating system requests reduced motion.
PUBLIC CONTRACT
MeterGroup API
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| items | readonly NeuralMeterItem[] | [] | Immutable measurement definitions. |
| min | number | 0 | Shared lower bound. |
| max | number | 100 | Shared upper bound; invalid bounds normalize safely. |
| orientation | 'horizontal' | 'vertical' | 'horizontal' | Meter axis. |
| labelPosition | 'start' | 'end' | 'end' | Logical label placement. |
| labelOrientation | 'horizontal' | 'vertical' | 'horizontal' | Legend flow. |
| showLabels | boolean | true | Shows the visible legend. |
| showValues | boolean | true | Shows formatted values in the legend. |
| valueFormatter | NeuralMeterValueFormatter | null | null | Formats visible values without changing ARIA values. |
| ariaLabel | string | null | null | Direct accessible group name. |
| ariaLabelledBy | string | null | null | References an external group label and takes precedence. |
| unstyled | boolean | false | Removes NeuralNg visual classes. |
| meterGroupClass | string | '' | Adds consumer root classes. |
| classes | NeuralMeterGroupClasses | {} | Typed class slots. |
NeuralMeterItem
labelstringRequired visible and accessible name.
valuenumberRaw value normalized into the shared range.
colorstringOptional CSS color overriding the palette.
iconClassstringOptional icon and utility classes for the legend.
valueTextstringOptional human-friendly aria-valuetext.
Typed class slots
rootmetersmeterlabelslabelItemmarkericonlabelvalueMETER GROUP
Design tokens
Neutral, dark mode, Glass, Futuristic and Mist share this stable component surface.
Component tokens
--neural-meter-group-track-backgroundTrack background surface.
--neural-meter-group-track-borderTrack border shorthand.
--neural-meter-group-radiusComponent corner radius.
--neural-meter-group-shadowComponent box shadow.
--neural-meter-group-heightComponent block size.
--neural-meter-group-vertical-heightVertical block size.
--neural-meter-group-vertical-widthVertical inline size.
--neural-meter-group-color-1First fallback color in the automatic meter item palette.
--neural-meter-group-color-2Second fallback color in the automatic meter item palette.
--neural-meter-group-color-3Third fallback color in the automatic meter item palette.
--neural-meter-group-color-4Fourth fallback color in the automatic meter item palette.
--neural-meter-group-color-5Fifth fallback color in the automatic meter item palette.
--neural-meter-group-color-6Sixth fallback color in the automatic meter item palette.
--neural-meter-group-label-colorLabel foreground color.
--neural-meter-group-value-colorValue foreground color.
--neural-meter-group-labels-gapSpacing between labels items.
--neural-meter-group-label-gapSpacing between label items.
--neural-meter-group-label-item-gapSpacing between label item items.
--neural-meter-group-marker-sizeMarker width and height.
--neural-meter-group-marker-radiusMarker corner radius.
--neural-meter-group-icon-sizeIcon width and height.
--neural-meter-group-font-familyComponent font family.
--neural-meter-group-font-sizeComponent font size.
--neural-meter-group-label-font-weightLabel font weight.
--neural-meter-group-value-font-weightValue font weight.
--neural-meter-group-line-heightComponent line height.
--neural-meter-group-transition-durationTransition animation duration.
--neural-meter-group-transition-easingTransition animation easing curve.