본문으로 건너뛰기
언어

Price breakdownhospitality

Collapsible price lines from list price to total, summed in minor units with a server-total mismatch report.

설치

pnpm
pnpm dlx shadcn@4.23.0 add @uikit/price-breakdown

의존 아이템collapsiblelocalepricestyle

Default

price-breakdown-demo.tsx
import { PriceBreakdown, type PriceBreakdownItem } from "@/components/ui/price-breakdown";
const items: PriceBreakdownItem[] = [  { id: "room", label: "2 nights", amount: 24000, kind: "base" },  { id: "promo", label: "Early bird", amount: -2400, kind: "discount" },  { id: "cleaning", label: "Cleaning fee", amount: 1500, kind: "fee" },  { id: "tax", label: "Tax", amount: 2310, kind: "tax" },];
export default function PriceBreakdownDemo() {  return <PriceBreakdown items={items} currency="USD" defaultOpen />;}