Quantity
Honest values: formatQuantity() and QuantityValue show unknown as a dash, estimated with ~ and screen reader text, and the source in the title.
Example
- Measured
- 18,240
- Estimated
- $0.42 (estimated)
- Derived
- 3
- Unknown
- unknown
quantity-demo.tsxCopy code
Installation
Copy code
Brings alonglocale
Usage
ImportCopy code
API reference
QuantityValue
| Prop | Type | Default |
|---|---|---|
valuerequired | Quantity | – |
Also takes <span> attributes and render except children, FormatQuantityOptions.
Other exports
defaultQuantityLabelsformatQuantityisQuantitytype FormatQuantityOptionstype FormattedQuantitytype Qualitytype Quantitytype QuantityLabelstype QuantityValuePropsAccessibility
- Unknown shows as a dash and estimated with ~; the title explains where a value comes from.
Agent actions
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.