Skip to content
caliper ui pro docs

Money field

A currency amount field with a currency picker and quick-add steps.

Pro
Inês CarvalhoFreelance · Lisbon · paid 6 times
$1.00 to $2,480.00

Arrow keys step by 1, Shift by 10.

When to use

  • Payments, budgets and invoices where the amount and currency go together.
  • You want min and max limits with clear feedback.

When not to use

  • The value is a plain number; use a number field.
  • The currency is fixed and invisible; use a number input with a suffix.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/money-field

Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

MoneyField

16 props
PropTypeDefault
label *string—
valuenumber | null—
defaultValuenumber | nullnull
currency"USD" | "EUR" | "GBP" | "JPY"—
defaultCurrency"USD" | "EUR" | "GBP" | "JPY""USD"
currenciesreadonly ("USD" | "EUR" | "GBP" | "JPY")[]["USD", "EUR", "GBP", "JPY"]
minnumber—
maxnumber—
quickAddreadonly number[][10, 50]
disabledboolean—
namestring—
idstring—
descriptionstring—
onValueChange((value: number | null, details: MoneyDetails) => void)—
onCurrencyChange((currency: "USD" | "EUR" | "GBP" | "JPY") => void)—
classNamestring—

Keyboard

↑
Moves to the previous item or value.
PageUp
Moves by a larger step, or to the previous page.
↓
Moves to the next item or value.
PageDown
Moves by a larger step, or to the next page.

Accessibility

It exposes spinbutton and status semantics, with aria-hidden, aria-valuenow, aria-valuemin, aria-valuemax, aria-valuetext and aria-describedby kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/money-field.md

The index of every part is at /llms.txt.

More in Money and phone