DocsBlog

Get Started

Components

Data Grid

Signals

Styling

Theming

↑↓Navigate
↵Select
EscClose
  • 1.8.0

  • Day

    Night

    Preview

    Switch mode
  • cerberus

    acheron

    elysium

    oceanus

Get Started
Components
Data Grid
Signals
Styling
Theming

Concepts

OverviewCompositionCerberus ContextTesting

Layout

Aspect RatioBleedBoxCenterContainerContainer QueryDividerFlexFloatGridGroupLink OverlayScrollableStackWrap

Components

AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTA ModalDate PickerDialogFieldFieldsetFile UploaderIconButtonInputLoading StatesMarqueeMenuNotificationsNumber InputPaginationPin InputPopoverProgress IndicatorsPrompt ModalRadioRatingSelectSliderSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

Utilities

Client OnlyDownload TriggerEnvironmentFeature FlagsFocus TrapForFormat ByteFormat NumberFormat Relative TimeFormat Relative TimeFrameHighlightJSON Tree ViewLocalePortalPresenceShowSwapsplitPropsTheme

Format Byte

Formats a byte value with automatic unit conversion and display options.

  • npm
View as Markdown
Open this page in Markdown
Anthropic
Open in Claude
Ask questions about this page
OpenAI
Open in ChatGPT
Ask questions about this page

Import

import { Format } from '@cerberus/react'

Usage

The byte formatting component extends the number formatting capabilities to handle byte-specific formatting, including automatic unit conversion and display options.

Examples

Basic

Use the Format.Byte component to format a byte value with default options.

Loading example...

Sizes

Use the sizes prop to specify custom byte sizes for formatting.

Loading example...

Locale

Use the locale prop to format the byte value according to a specific locale.

Loading example...

Unit

Use the unit prop to specify the unit of the byte value.

Loading example...

Unit Display

Use the unitDisplay prop to specify the display of the unit.

Loading example...

On this page

  • Import
  • Usage
  • Examples
    • Basic
    • Sizes
    • Locale
    • Unit
    • Unit Display
Edit this page on Github
File size: 1.45 kB
50 byte
5 kB
5 MB
5 GB
1,45 kB1.45 kB
File size: 1.45 kb
50.3kB50.3 kB50.3 kilobytes