@enso-ui/money
Money
Description
Money provides a two-way bound amount field that formats and sanitizes monetary values using accounting-js.
Installation
Install the package:
yarn add @enso-ui/money
The component can be consumed standalone or inside higher-level Enso form packages.
Features
- exports a single
Moneycomponent from the package root - supports input mode and read-only label mode
- sanitizes user input and rounds values to the configured precision
- customizes symbol, decimal separator, thousands separator, and positive/negative/zero formats
Usage
<script setup>
import Money from '@enso-ui/money';
</script>
<Money
v-model="amount"
symbol="€"
:precision="2" />
API
Money
Import: @enso-ui/money
Props:
modelValue: number | string | null = nulllabel: boolean = falsereadonly: boolean = falsedisabled: boolean = falseplaceholder: string | null = nullsymbol: string = '$'decimal: '.' | ',' = '.'thousand: ' ' | '.' | ',' = ','precision: number = 2positive: string = '%s %v'negative: string = '%s (%v)'zero: string = '%s --'tabindex: number | null = null
Emits:
update:modelValue
Behavior:
- shows formatted output when
labelis enabled - enters raw-edit mode on focus
- sanitizes, rounds, and emits the numeric value on input or blur
Depends On
accounting-jsfor money formatting and parsing.
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!
License
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 3.1.3 | ^3.5.0 | MIT | |
| 3.1.2 | ^3.5.0 | MIT | |
| 3.1.1 | ^3.5.0 | MIT | |
| 3.1.0 | ^3.0 | MIT | |
| 3.0.0 | ^3.0 | MIT | |
| 2.0.11 | ^3.0 | ISC | |
| 2.0.10 | ^3.0 | ISC | |
| 2.0.9 | ^3.0 | ISC | |
| 2.0.8 | ^3.0 | ISC | |
| 2.0.7 | ^3.0 | ISC | |
| 2.0.6 | ^3.0 | ISC | |
| 2.0.5 | ^3.0 | ISC | |
| 2.0.4 | ^3.0 | ISC | |
| 2.0.3 | ^3.0 | ISC | |
| 2.0.2 | ^3.0 | ISC | |
| 2.0.1 | ^3.0 | ISC | |
| 2.0.0 | ^3.0 | ISC | |
| 1.0.13 | ^2.5.16 | ISC | |
| 1.0.12 | ^2.5.16 | ISC | |
| 1.0.11 | ^2.5.16 | ISC | |
| 1.0.10 | ^2.5.16 | ISC | |
| 1.0.9 | ^2.5.16 | ISC | |
| 1.0.8 | ^2.5.16 | ISC | |
| 1.0.7 | ^2.5.16 | ISC | |
| 1.0.6 | ^2.5.16 | ISC | |
| 1.0.5 | ^2.5.16 | ISC | |
| 1.0.4 | ^2.5.16 | ISC | |
| 1.0.3 | ^2.5.16 | ISC | |
| 1.0.2 | ^2.5.16 | ISC | |
| 1.0.1 | ^2.5.16 | ISC |
Showing the latest 30 of 31. See every release on npm