fp-money is a currency input formatter and selector library for the web, currently at version 2.0.0. It provides real-time formatting of monetary values with support for custom currencies, locale-aware display, and utility functions for converting between float and integer representations. Key differentiators include built-in Vue 3 component support, full TypeScript typings, and a lightweight footprint with no external dependencies. Released under MIT, it receives active maintenance.
npm install fp-moneyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a basic currency input with initial value, USD currency, and a change handler.
Update import to 'import FPMoney from 'fp-money/vue'; import 'fp-money/vue/style.css';'
Import CSS as 'import 'fp-money/style.css';' or 'import 'fp-money/vue/style.css';' for Vue.
Replace the 'change' option with 'onChange'.
Use 'const value = ref(1000.5)' (number) and not a string.
Provide a merged object: { ...defaultCurrencies, BTC: { symbol: '₿', fraction: 8 } }Set 'valueFormat' to 'int' if you need integer values in the callback.
Use 'import FPMoney from 'fp-money'' for vanilla JS, not 'from 'fp-money/vue''.
Ensure you have imported 'fp-money/style.css' or 'fp-money/vue/style.css'.
Pass a valid DOM element to the 'container' option.
Use 'import FPMoney from 'fp-money/vue'' and register it.
No dependency data recorded yet.