Skip to contentKino
Skip to Content

Money input

An amount of money, with the symbol where the locale writes it, digits grouped as they are typed, and the value in minor units.

npx shadcn add https://kinoui.com/r/money-input.json
Share on

Examples

US Dollar

Kino pauses new seats once it’s spent.

Default

Type an amount and its digits group as you go; the value is in cents, and the decimals fill in when you leave it.

Euro
日本円

Locale

locale puts the symbol on its side and sets the separators; the currency sets the decimals, none for yen.

Refund payment

Kino Team plan, 8 seats · paid Nov 2 · $1,280.00
US Dollar

Up to the full $1,280.00.

Min and max

With allowOutOfRange, an amount past max stays as typed and the field shows why it can’t go. The arrow keys step by step, here $10.

New invoice

Kino · due in 30 days
Euro

Billed in the client’s currency.

Currency

MoneyInputCurrency picks the currency from a list you give; the amount keeps its number.

Installation

npx shadcn@latest add https://kinoui.com/r/money-input.json
Files
lib/refs.tslib/reduce-motion.tscomponents/kino/input.tsxlib/resize.tslib/roll.tsxcomponents/kino/number-field.tsxlib/field-control.tsxlib/scroll.tslib/swap.tsxlib/popup.tslib/glide.tsxcomponents/kino/tooltip.tsxlib/cut.tsxcomponents/kino/label.tsxcomponents/kino/spinner.tsxcomponents/kino/button.tsxcomponents/kino/separator.tsxlib/run-progress.tslib/highlight.tslib/menu.tsxcomponents/kino/select.tsxlib/filter-list.tsxlib/chip.tsxlib/flow.tscomponents/kino/combobox.tsxcomponents/kino/textarea.tsxcomponents/kino/input-group.tsxlib/addon-picker.tsxlib/countries.tsxlib/number-format.tscomponents/kino/money-input.tsx
Packages
@base-ui/reactclass-variance-authoritycountry-flag-icons

New to Kino? Installation covers what your project needs first and the @kino namespace.

API reference

MoneyInput

PropTypeDefaultDescription
currencystringNoneThe currency as an ISO 4217 code, such as USD, when you hold the state.
defaultCurrencystring'USD'The currency at first, when you leave the state to the field.
onCurrencyChange(currency, { value }) => voidNoneCalled when another currency is picked, with the amount moved to it: the same number, rounded to its decimals. Holding both, set them together, or neither to turn the change down.
valuenumbernullNoneThe amount in minor units, such as cents: 128050 is $1,280.50.
defaultValuenumbernullNoneThe amount at first, in minor units.
onValueChange(value, details) => voidNoneCalled with the amount in minor units as it changes.
onValueCommitted(value, details) => voidNoneCalled with the amount in minor units on blur or a step.
localeIntl.LocalesArgumentNoneWhere the symbol goes, the separators and the digits. The browser’s own by default.
minnumberNoneThe lowest amount, in minor units. Below 0 allows a minus sign.
maxnumberNoneThe highest amount, in minor units.
stepnumberone unitHow far an arrow key steps, in minor units.
largeStepnumberten unitsHow far Shift with an arrow key steps, in minor units.
currencyNamestringNoneSends the currency with a form under this name. The amount goes under the field’s name as a decimal, such as 1280.50.

MoneyInputCurrency

PropTypeDefaultDescription
currenciesreadonly string[]NoneISO 4217 codes, in the order the list shows them.
labelstring'Currency'What is picked: the button reads “Currency: Euro (EUR)”.
searchPlaceholderstring'Search currencies'The search field’s placeholder and name.

Accessibility

  • The currency’s name, such as “US Dollar”, describes the input; the symbol beside it is for the eye only.
  • The arrow keys step it and Shift with them by largeStep; Home and End move the caret, as in any text.
  • Typing never moves the caret off the digit it was beside, though separators come and go; Backspace on a separator removes the digit before it.
  • The keyboard on a phone shows a decimal point, or digits only for a currency without decimals.
  • When the system asks for less motion, stepped digits only crossfade.