Product Price
Display product pricing that automatically updates based on variant selection from Product context.
Interactive Demo
ProductPrice is an optional React convenience over the mockup URL. Price comes from the public catalog — this component just formats it.Try the product price component in different configurations using the variant switcher:
Loading playground...
Component Props
contextPricenumberPrice in cents. Use this for standalone usage outside Product context. If not provided, automatically reads from Product context.
showCentsbooleanWhether to show cents in the price display. Defaults to
true.showCurrencybooleanWhether to show the currency symbol. Defaults to
false.currencystringCurrency code (e.g., “USD”, “EUR”). Defaults to
“USD”.localestringLocale for price formatting (e.g., “en-US”, “de-DE”). Defaults to
“en-US”.classNamestringCSS classes to apply to the price element.
Installation
npm install @snowcone-app/ui
Styling — your Tailwind v4 build compiles it. In your global stylesheet, add
@import '@snowcone-app/ui/styles/globals.css' (brings in Tailwind, the theme tokens, and an @source for the package) plus an @source for your own code. In Next.js, also add transpilePackages: ['@snowcone-app/ui']. Add className="dark" on an ancestor for dark mode.
