Skip to content

PriceRange

Use PriceRange to display a product’s price, whether a single amount for a simple product or a minimum-to-maximum range for a configurable product. The display prop controls how the range is presented.

The SDK PriceRange showing a minimum-to-maximum price range.
import { PriceRange } from '/@dropins/tools/components.js';
PropTypeReq?Description
amountnumberNoThe price of a simple product.
minimumAmountnumberNoThe minimum price of a product price range.
maximumAmountnumberNoThe maximum price of a product price range.
specialPricenumberNoThe special price of a product.
currencystringNoThe currency code used to format prices (for example, USD).
localestringNoThe locale used to format prices (for example, en-US).
display'dash' | 'from to' | 'as low as'NoHow to present the range. Defaults to dash.
variant'default' | 'strikethrough'NoThe price display variant. Defaults to default.
size'small' | 'medium' | 'large'NoThe price size. Defaults to small.
salebooleanNoApply contrast styling to a special sale price. Defaults to false.

PriceRange also accepts standard HTML attributes (for example, className), except size.

Render a from/to price range for a configurable product.

import { PriceRange, provider } from '/@dropins/tools/components.js';
await provider.render(PriceRange, {
currency: 'USD',
minimumAmount: 56.0,
maximumAmount: 58.0,
display: 'from to',
})(document.querySelector('.price-range'));
  • Price — display a single formatted price.
  • Design tokens — the typography and color scales prices use.