Price

A price with compare-at and discount badge.

$29.00

Sale

$29.00was $39.00save -26%

Sizes

$29.00was $39.00save -26% $29.00was $39.00save -26% $29.00was $39.00save -26%

API reference

Inputs

PropTypeDefaultDescription
amountnumber0Current price amount to display.
compareAtnumber | nullnullOriginal price; when higher than amount, shows as struck-through.
currencystring'$'Currency symbol prefixed to each value.
size"default" | "lg" | "sm"'default'Text size preset for the price.
showDiscountbooleantrueWhether to show the percentage-off discount badge when on sale.
localestringBCP 47 locale for number formatting. Defaults to the app's `LOCALE_ID`.
numberFormatIntl.NumberFormatOptionsDEFAULT_NUMBER_FORMAT`Intl.NumberFormat` options for the amounts. Replaces the default wholesale — pass `{ style: 'currency', currency: 'EUR' }` to let ICU place the symbol itself.

Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.