📄 primeng/metergroup

File: metergroup.md | Updated: 11/15/2025

Source: https://primeng.org/metergroup

  • Primary

    Surface

    PresetsAuraMaterialLaraNora

    Ripple

    RTL

  • v20

  • FEATURES

  • API

  • THEMING

  • PASSTHROUGH

MeterGroup

MeterGroup displays scalar measurements within a known range.

Import #

import { MeterGroupModule } from 'primeng/metergroup';

Basic #

MeterGroup requires a value as the data to display where each item in the collection should be a type of MeterItem.

  1. Space used (15%)

<p-metergroup [value]="value" />

Multiple #

Adding more items to the array displays the meters in a group.

  1. Apps (16%)
  2. Messages (8%)
  3. Media (24%)
  4. System (10%)

<p-metergroup [value]="value" />

Icon #

Icons can be displayed next to the labels instead of the default marker.

  1. Apps (16%)
  2. Messages (8%)
  3. Media (24%)
  4. System (10%)

<p-metergroup [value]="value" />

Label #

The position of the labels relative to the meters is defined using the labelPosition property. The default orientation of the labels is horizontal, and the vertical alternative is available through the labelOrientation option.

  1. Apps (16%)
  2. Messages (8%)
  3. Media (24%)
  4. System (10%)

<p-metergroup [value]="value" labelPosition="start" labelOrientation="vertical" />

Vertical #

Layout of the MeterGroup is configured with the orientation property that accepts either horizontal or vertical as available options.

  1. Apps (16%)
  2. Messages (8%)
  3. Media (24%)
  4. System (10%)

<p-metergroup [value]="value" orientation="vertical" labelOrientation="vertical" [style]="{ height: '300px' }" />

Min Max #

Boundaries are configured with the min and max values whose defaults are 0 and 100 respectively.

  1. Apps (8%)
  2. Messages (4%)
  3. Media (12%)
  4. System (5%)

<p-metergroup [value]="value" [max]="200" />

Template #

MeterGroup provides templating support for labels, meter items, and content around the meters.

Apps25%

Messages15%

Media20%

System10%

Storage70%1TB

Manage StorageUpdate Plan

<p-metergroup [value]="value" labelPosition="start"> <ng-template #label> <div class="flex flex-wrap gap-4"> <ng-container *ngFor="let meterItem of value; let index = index"> <p-card class="flex-1" styleClass="border border-surface shadow-none"> <div class="flex justify-between gap-8"> <div class="flex flex-col gap-1"> <span class="text-surface-500 dark:text-surface-400 text-sm">{{ meterItem.label }}</span> <span class="font-bold text-lg">{{ meterItem.value }}%</span> </div> <span class="w-8 h-8 rounded-full inline-flex justify-center items-center text-center" [style]="{ 'background-color': meterItem.color1, color: '#ffffff' }"> <i [class]="meterItem.icon"></i> </span> </div> </p-card> </ng-container> </div> </ng-template> <ng-template #meter let-value let-class="class" let-width="size"> <span [class]="class" [style]="{ background: 'linear-gradient(to right, ' + value.color1 + ', ' + value.color2 + ')', width: width }"></span> </ng-template> <ng-template #start let-totalPercent="totalPercent"> <div class="flex justify-between mt-4 mb-2 relative"> <span>Storage</span> <span [style]="{ width: totalPercent + '%' }" class="absolute text-right">{{ totalPercent }}%</span> <span class="font-medium">1TB</span> </div> </ng-template> <ng-template #end> <div class="flex justify-between mt-4"> <p-button label="Manage Storage" [outlined]="true" size="small" /> <p-button label="Update Plan" size="small" /> </div> </ng-template> </p-metergroup>

Accessibility #

Screen Reader

MeterGroup component uses meter role in addition to the aria-valuemin, aria-valuemax and aria-valuenow attributes. Value to describe the component can be defined using aria-labelledby prop.

Keyboard Support

Component does not include any interactive elements.

  • Import

  • Basic

  • Multiple

  • Icon

  • Label

  • Vertical

  • Min Max

  • Template

  • Accessibility

Theme Designer

Theme Designer is the ultimate tool to customize and design your own themes featuring a visual editor, figma to theme code, cloud storage, and migration assistant.

PrimeNG 20.3.0 by PrimeTek