price

Price

Shows a price in the shopper's locale, with the original price and the percentage saved when it is reduced, and a hint such as tax and shipping.

States: Default

Parts

PartFileDoes
PricePrice.vueShows a price, with the original price and discount percentage when reduced.
PriceAmountPriceAmount.vueShows the current price of the product.
PriceRefPriceRef.vueShows the original price of a discounted product.
PriceDiscountPriceDiscount.vueShows the percentage saved against the original price.
PriceHintPriceHint.vueHolds a note below the price, such as tax and shipping, which may link on.

Anatomy

<Price>
  <PriceDiscount />
  <PriceRef />
  <PriceAmount />
  <PriceHint />
</Price>

Styling

PartRecipe
Priceprice
Priceprice-row
PriceRefprice-strike
PriceDiscountprice-discount
PriceHintprice-hint

Install

Writes 6 files into components/ui/price/. For agents, npx @frontic/ui docs price prints this reference as markdown; the MCP server serves the same.

Installs with it
badge
format
npm packages
class-variance-authority
reka-ui

Built from

API reference

Price Price.vue

Shows a price, with the original price and discount percentage when reduced. Renders a <span>.

PropTypeDefault
classClassValue—
sizePriceSize'md'
alignPriceAlign'start'
price*PriceType—
localestring—
showRefbooleantrue
showDiscountbooleantrue
showHintbooleantrue
refLabelstring'Was'
amountLabelstring'Now'
SlotSlot props
hint—
Recipe priceSets
base: price 4 properties
size: sm 2 properties
size: mddefault 2 properties
size: lg 2 properties
align: startdefault 2 properties
align: end 2 properties
Recipe price-rowSets
base: price-row 1 property

PriceAmount PriceAmount.vue

PriceRef PriceRef.vue

PriceDiscount PriceDiscount.vue

PriceHint PriceHint.vue

Example