Skip to content

Demos

If you learn better by seeing code in action, or want to start from an existing project, check out the Dinero.js demos.

Shopping cart with React

A React-powered shopping cart that calculates line totals with multiply, aggregates a subtotal with add, extracts VAT with allocate, and lets you switch between USD and EUR with convert.

View demo

Shopping cart with React

Shopping cart with Vue.js

The same shopping cart, built with Vue.js. Uses computed properties to recalculate line totals, tax, and currency conversions reactively as you update quantities or switch currencies.

View demo

Shopping cart with Vue.js

Pricing page with React

A React-powered SaaS pricing page with per-seat pricing. Uses multiply for seat-based totals, allocate to calculate annual discounts, and hasSubUnits to hide unnecessary decimals.

View demo

Pricing page with React

Expense splitter

An expense splitter. Uses allocate for fair bill splitting, add and subtract for balance tracking, and toDecimal for locale-aware formatting. Supports equal and percentage-based splits with optimal debt settlement.

View demo

Expense splitter

Invoice builder

An invoice builder with live preview. Uses multiply for line totals, add for subtotals, allocate for discounts and tax, and toDecimal for locale-aware currency formatting across multiple currencies.

View demo

Invoice builder

Portfolio tracker

A multi-currency portfolio tracker. Uses multiply with scaled amounts for holding values, convert for cross-currency aggregation, add for portfolio totals, and toDecimal for locale-aware formatting across multiple currencies.

View demo

Portfolio tracker

Released under the MIT License.