Component
DataNumber
Published on
Description
The DataNumber component formats numeric values using Intl.NumberFormat, supporting locale-aware decimal separators, currency, and percentage styles.
Use DataNumber for displaying prices, statistics, or any numeric value that benefits from locale-aware formatting. For file sizes, use DataBytes instead.
Example
Accessibility
- Renders as a
<data>element with the raw value preserved in thevalueattribute - Screen readers announce the formatted number text
- Supports
Intl.NumberFormatoptions likestyle,currency, andminimumFractionDigits
Related
Variables
None