Skip to main content

FormatDigital

Format Digital | Formatting numeric values shadow

The FormatDigital component is designed to format numeric values into a human-readable digital format with respect to various unit prefixes such as kilo, mega, giga, etc. It offers options to customize units, display style of units and supports localization.

Basic Usage

Display formats

Byte formats

Bit formats

Attributes and Properties

unit

DescriptionDefines the unit for displaying values.
Attributeunit
Type"bit" | "byte" | string & Record<never, never> | undefined
Defaultbytes

unit-display

DescriptionSets the fragment size for uploading large files in bytes.
Attributeunit-display
Type"long" | "narrow" | "short" | string & Record<never, never> | undefined
Defaultshort

Events

No events available for this component.

Methods

No public methods available for this component.

CSS Shadow Parts

NameDescription
nativeReferences a div element with the native-format-digital class inside the element

CSS Custom Properties

No CSS custom properties available for this component.

Slots

NameDescription
``The contents are placed between the named slots.
endThe content is placed to the right of the button text in LTR and to the left in RTL
startThe content is placed to the left of the button text in LTR and to the right in RTL.