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
Formatted price with currency, original price, and discount badge.
No interactive demo is registered for this component yet — the source is shown directly.
import * as React from "react"
import { cn } from "@/lib/utils"
function PriceDisplay({
amount,
currency = "USD",
originalAmount,
discount,
className,
...props
}: {
amount: number
currency?: string
originalAmount?: number
discount?: string
} & React.ComponentProps<"div">) {
const formatter = new Intl.NumberFormat(undefined, { style: "currency", currency })
return (
<div
data-slot="price-display" data-portal="https://design.nyuchi.com/components/price-display"
className={cn("flex flex-wrap items-baseline gap-2", className)}
{...props}
>
<span className="text-2xl font-bold text-foreground">{formatter.format(amount)}</span>
{originalAmount != null && originalAmount > amount && (
<span className="text-sm text-muted-foreground line-through">
{formatter.format(originalAmount)}
</span>
)}
{discount && (
<span className="rounded-full bg-[var(--status-success, var(--color-malachite, #64FFDA))]/15 px-2 py-0.5 text-xs font-medium text-[var(--status-success, var(--color-malachite, #64FFDA))]">
{discount}
</span>
)}
</div>
)
}
export { PriceDisplay }
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/price-displaynpx shadcn@latest add https://mzizi.dev/api/v1/ui/price-displaycomponents/ui/price-display.tsx