DefaultUnitUnitDisplayPrecisionLocaleValueDisplay
<div nve-layout="column gap:sm">
<nve-format-bytes>1024</nve-format-bytes>
<nve-format-bytes>1048576</nve-format-bytes>
<nve-format-bytes>1073741824</nve-format-bytes>
</div>
Edit Example Formats a byte count as localized, human-readable decimal or binary units.
<div nve-layout="column gap:sm">
<nve-format-bytes unit="kb">1048576</nve-format-bytes>
<nve-format-bytes unit="mb">1048576</nve-format-bytes>
<nve-format-bytes unit="gb">1048576</nve-format-bytes>
</div>
Edit Example Optional unit magnitude. When omitted, the component selects a unit from the byte count.
Unit Description b kb mb gb tb pb <div nve-layout="column gap:sm">
<nve-format-bytes unit-display="short">1048576</nve-format-bytes>
<nve-format-bytes unit-display="long">1048576</nve-format-bytes>
<nve-format-bytes display="binary" unit-display="long">1048576</nve-format-bytes>
</div>
Edit Example Unit label length: 'short' renders labels such as 'MB'; 'long' renders labels such as 'megabytes'.
UnitDisplay Description short long <div nve-layout="column gap:sm">
<nve-format-bytes maximum-fraction-digits="0">1234567</nve-format-bytes>
<nve-format-bytes maximum-fraction-digits="2">1234567</nve-format-bytes>
<nve-format-bytes minimum-fraction-digits="3" maximum-fraction-digits="3">1234567</nve-format-bytes>
</div>
Edit Example Fraction digit controls for matching the precision of storage measurements. Use fixed digits when values must align visually.
<div nve-layout="column gap:sm">
<nve-format-bytes locale="en-US">1048576</nve-format-bytes>
<nve-format-bytes locale="de-DE">1048576</nve-format-bytes>
<nve-format-bytes locale="fr-FR">1048576</nve-format-bytes>
</div>
Edit Example Language tag (such as en-US or de-DE) used to format the number.Defaults to document.documentElement.lang or the runtime default.
Locale Description string <nve-format-bytes value="1048576">1024</nve-format-bytes>
1024
Edit Example Optional byte count for values supplied by JavaScript or bound data.By default, the component formats the element's text content, which also serves as the SSR fallback.When both are present, this property takes precedence.
Value Description number <div nve-layout="column gap:sm">
<nve-format-bytes display="decimal">1024</nve-format-bytes>
<nve-format-bytes display="binary">1024</nve-format-bytes>
</div>
Edit Example Unit system: 'decimal' uses powers of 1000 and 'binary' uses powers of 1024.
Display Description decimal binary