nyuchimzizi
Mzizi — an open-architecture project of the Bundu Foundation, operated and developed by Nyuchi. Built on the Five African Minerals palette.
Built by Nyuchi Africav4.0.39
Personal sovereign pod storage usage visualization. Shows total allocation, used space by category (messages, media, documents, AI models), and upgrade path via NST. Data from Layer 1 (Pod) of the 7-layer data architecture.
View the full component source code below.
import * as React from "react"
import { cn } from "@/lib/utils"
interface StorageCategory {
label: string
sizeGB: number
color: string
}
interface PodStorageMeterProps extends React.ComponentProps<"div"> {
totalGB: number
categories: StorageCategory[]
nstAllocation?: number
}
function PodStorageMeter({ totalGB, categories, nstAllocation, loading = false, className, ...props }: PodStorageMeterProps) {
const usedGB = categories.reduce((sum, c) => sum + c.sizeGB, 0)
const usedPct = (usedGB / totalGB) * 100
return (
<div
data-slot="pod-storage-meter" data-portal="https://design.nyuchi.com/components/pod-storage-meter"
role="meter"
aria-valuenow={usedGB}
aria-valuemin={0}
aria-valuemax={totalGB}
aria-label={`Pod storage: ${usedGB.toFixed(1)} of ${totalGB} GB used`}
className={cn("rounded-[var(--radius-lg,14px)] border border-border bg-card p-4", className)}
{...props}
>
<div className="flex items-center justify-between">
<span className="text-sm font-medium">Sovereign Pod</span>
<span className="text-xs text-muted-foreground">{usedGB.toFixed(1)} / {totalGB} GB</span>
</div>
{/* Stacked bar */}
<div className="mt-3 flex h-2 overflow-hidden rounded-full bg-muted">
{categories.map((cat, i) => (
<div key={i} className="h-full" style={{ width: `${(cat.sizeGB / totalGB) * 100}%`, backgroundColor: cat.color }} />
))}
</div>
{/* Legend */}
<div className="mt-2 flex flex-wrap gap-x-3 gap-y-1">
{categories.map((cat, i) => (
<div key={i} className="flex items-center gap-1 text-[10px] text-muted-foreground">
<div className="size-2 rounded-full" style={{ backgroundColor: cat.color }} />
<span>{cat.label} ({cat.sizeGB.toFixed(1)} GB)</span>
</div>
))}
</div>
{nstAllocation !== undefined && (
<div className="mt-2 text-[10px] text-muted-foreground">
NST Allocation: {nstAllocation.toLocaleString()} tokens
</div>
)}
</div>
)
}
export { PodStorageMeter }
export type { PodStorageMeterProps }
npx shadcn@latest add https://mzizi.dev/api/v1/ui/pod-storage-meterFetch this component's metadata and source code from the registry API.
/api/v1/ui/pod-storage-meter