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.
Tone
The share is (value + pending) / max. With the default tone="auto":
| Share | Tone |
|---|---|
Under warn-at (default 0.75) | accent |
From warn-at to max | warning |
Over max | danger, 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:
<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-labeloraria-labelledby, for example "Credit used". - The element has
role="meter".aria-valuenowstays inside the range, as ARIA requires.aria-valuetextgives 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
Input
Text, number, currency and date field with label and validation.
Popover
Floating panel anchored to a trigger.
NSUI is a community project. It is not an official Oracle NetSuite product. NetSuite is a trademark of Oracle.