Money input

A localized currency field on Intl.NumberFormat.

Localized currency

API reference

Inputs

PropTypeDefaultDescription
localestring''BCP 47 locale for formatting/parsing. Defaults to the runtime locale.
currencystring'USD'ISO 4217 currency code, e.g. `USD`, `EUR`, `MAD`.
currencyDisplayCurrencyDisplay'narrowSymbol'How the currency is shown. `narrowSymbol` renders the local symbol when ICU has one.
symbolstring''Custom currency symbol that overrides the one ICU would render, kept in the locale's correct position and spacing. Use it when the ISO data has no local glyph — e.g. `symbol="DH"` shows `DH` instead of the `MAD` code for Moroccan dirham.
minimumFractionDigitsnumber | nullnullMinimum fraction digits shown when formatted. Defaults to the currency's own default.
maximumFractionDigitsnumber | nullnullMaximum fraction digits shown when formatted. Defaults to the currency's own default.
placeholderstring''Placeholder shown when the field is empty.
namestring''Native `name` attribute for the input.
idstring''Native `id` attribute; falls back to a generated id.
aria-labelstring''Accessible name, applied to the inner input.

Two-way models

Bind with [(name)], or one-way as an input.

PropTypeDefaultDescription
valuenumber | nullnullThe numeric amount. Two-way bindable with `[(value)]`. `null` when the field is empty.
disabledbooleanfalseWhether the field is disabled. Two-way bindable with `[(disabled)]`.

Types

CurrencyDisplay — How the currency is shown: local symbol, narrow symbol, ISO code, or full name.

"code" | "name" | "narrowSymbol" | "symbol"

Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.