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

This demo showcases Dinero.js in action in a React-powered expense splitter. It demonstrates fair bill splitting with allocate(), balance tracking, and optimal debt settlement.

View demo

Starter playground

A minimal playground to try Dinero.js with zero setup. Creates a Dinero object, inspects it with toSnapshot, and formats it with toDecimal. Ideal for quick experiments and reproducing issues.

View demo

Starter playground

Released under the MIT License.