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
Order total breakdown with line items and total.
No interactive demo is registered for this component yet — the source is shown directly.
import * as React from "react"
import { cn } from "@/lib/utils"
interface OrderSummaryItem {
label: string
amount: number
}
function OrderSummary({ loading = false,
items,
total,
currency = "USD",
className,
...props
}: {
items: OrderSummaryItem[]
total: number
currency?: string
} & React.ComponentProps<"div">) {
const formatter = new Intl.NumberFormat(undefined, { style: "currency", currency })
return (
<div data-slot="order-summary" data-portal="https://design.nyuchi.com/components/order-summary" className={cn("flex flex-col gap-3", className)} {...props}>
{items.map((item) => (
<div key={item.label} className="flex items-center justify-between text-sm">
<span className="text-muted-foreground">{item.label}</span>
<span className="text-foreground tabular-nums">{formatter.format(item.amount)}</span>
</div>
))}
<div className="h-px bg-border" role="separator" />
<div className="flex items-center justify-between">
<span className="text-sm font-semibold text-foreground">Total</span>
<span className="text-base font-bold text-foreground tabular-nums">
{formatter.format(total)}
</span>
</div>
</div>
)
}
export { OrderSummary, type OrderSummaryItem }
The variants, sizes, and props surfaced by the registry. Each is sourced from the Supabase component_docs table.
Hit the registry API live and see the JSON the shadcn CLI consumes when it installs this component.
/api/v1/ui/order-summarynpx shadcn@latest add https://mzizi.dev/api/v1/ui/order-summarycomponents/ui/order-summary.tsx