Skip to content

Formatting prices

Frontend

You may need to format prices in your AlpineJS components. Achieve this by using the Brush.i18n.formatPrice() global method. This method automatically handles proper formatting based on the current country and language.

some-component.ts
Brush.i18n.formatPrice(1200.23) // $1,200.23 for en_US, 1 200,23 € for fr_FR