Skip to Content
NSUI

Meter

Small ring that shows how much of a limit is used.

Use a meter for a share of a known limit: credit used against a credit limit, or the past-due share of open invoices. Put the value text inside the element. For details, add a tip after it.

0%25%50%75%100%132%
62% used58 of 65 committed

Tone

The share is (value + pending) / max. With the default tone="auto":

ShareTone
Under warn-at (default 0.75)accent
From warn-at to maxwarning
Over maxdanger, and the ring is drawn full

Set tone to accent, success, warning or danger when the meaning of the ring is fixed. auto never picks success; set it when a full share is good news, such as the committed share of an order. The past-due share of open invoices is always danger:

HTML
<nsui-meter value="9850" max="41281" tone="danger" aria-label="Outstanding">$41,281</nsui-meter>
<nsui-meter value="58" max="65" tone="success" aria-label="Committed">58 of 65 committed</nsui-meter>

Pending

pending is the amount this record would add, such as the unsaved lines of an order. The meter draws it as a lighter second arc after the used arc, and writes it as text after the value: pending="9000" max="60000" pending-label="this order" gives "· +15% this order".

Accessibility

  • Name the meter with aria-label or aria-labelledby, for example "Credit used".
  • The element has role="meter". aria-valuenow stays inside the range, as ARIA requires. aria-valuetext gives the real state, for example "132% used, over limit".
  • The meter does not move when its value changes. It redraws at once.

API

Attributes

Prop

Type

Slots

Prop

Type

CSS parts

Prop

Type

NSUI is a community project. It is not an official Oracle NetSuite product. NetSuite is a trademark of Oracle.

On this page