A shadcn-style byte formatting utility built with Ark UI primitives.

Avatar48.1 kB
Hero image1.56 MB
Backup9.22 GB

Installation

npx shadcn@latest add @ark-cn/format

Usage

import { FormatByte } from "@/components/ui/format"

Examples

Default

Avatar48.1 kB
Hero image1.56 MB
Backup9.22 GB

API reference

This utility mirrors Ark UI's byte formatter. The ark-cn file exports it both as FormatByte and as Format.Byte.

See the ARK UI documentation for the full API.