Price Tag
A price display component showing the amount in large orange text with an optional per-night suffix, strikethrough original price, and discount badge.
Preview
Default
₹499/night
₹1299/night
₹999₹799/night
20% off
Usage
tsx
import { PriceTag } from "zostel-ui";
{/* Default */}
<PriceTag price={499} suffix="/night" />
{/* With discount */}
<PriceTag
price={499}
originalPrice={799}
suffix="/night"
discount="38% off"
/>
{/* Compact */}
<PriceTag price={499} suffix="/night" size="sm" prefix="from" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
price | number | — | Price amount to display |
originalPrice | number | — | Original price shown with strikethrough |
suffix | string | "/night" | Text suffix after the price |
prefix | string | — | Text prefix before the price (e.g. from) |
discount | string | — | Discount badge text |
currency | string | "INR" | Currency code |
size | "sm" | "md" | "lg" | "md" | Size variant of the price display |
className | string | — | Additional CSS classes |
priceType:
numberDefault: —
Price amount to display
originalPriceType:
numberDefault: —
Original price shown with strikethrough
suffixType:
stringDefault: "/night"
Text suffix after the price
prefixType:
stringDefault: —
Text prefix before the price (e.g. from)
discountType:
stringDefault: —
Discount badge text
currencyType:
stringDefault: "INR"
Currency code
sizeType:
"sm" | "md" | "lg"Default: "md"
Size variant of the price display
classNameType:
stringDefault: —
Additional CSS classes