Appearance
usePrice ​
Internally, usePrice
composable uses Intl.NumberFormat in order to format a price according to the right currency standard, for corresponding locale and symbol.
js
const { getFormattedPrice } = usePrice({
currencyCode: 'EUR'
localeCode: 'de-DE' // value taken from browser's navigator.language variable if localeCode is not provided
});
const regularPrice = getFormattedPrice(49.95);
// regularPrice: '49,95 €'
Definition ​
Properties ​
Name | Type | Description |
---|
Methods ​
Name | Type | Description |
---|