Get License
Free
Pro

Currency Input

Locale-aware amount field. The control value is a number | null. While focused the field shows a raw editable number; on blur it formats with the currency’s fraction digits. Do not nest this inside base-input-group — it is a composite control.

freenew

USD and EUR

Bind with ngModel like any other CVA control.

Value: 1299

Value: 49.99

HTML

Installation

Run the following command to add this component to your project:

bash

npx base-ui-cli add currency-input

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.

bash

npx -y base-ui-mcp

Base UI provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)

// Install: npx base-ui-cli add currency-input
// Paths are relative to aliases.components (default: src/app/components)
import { CurrencyInputComponent } from './currency-input/currency-input.component';

@Component({
  selector: 'app-your-component',
  imports: [
    CurrencyInputComponent
  ],
  template: `...`
})
export class YourComponent {}

API for currency-input — generated from JSDoc in the library source.

API reference for currency-input
APIMemberTypeDefaultDescription
base-currency-inputclassstring''Extra host classes merged via `cn()`.
base-currency-inputcurrencyunknown'USD'ISO 4217 currency code used for formatting and the prefix symbol.
base-currency-inputlocaleunknown'en-US'BCP 47 locale passed to `Intl.NumberFormat`. Defaults to `en-US`.
base-currency-inputplaceholderunknown'0.00'Placeholder shown when the value is empty and the field is not focused.
base-currency-inputariaLabelunknown'Amount'Accessible name for the inner text field.
base-currency-inputminnumber | nullnullMinimum allowed value (applied on blur). Omit for no floor.
base-currency-inputmaxnumber | nullnullMaximum allowed value (applied on blur). Omit for no ceiling.
base-currency-inputshowSymbolbooleantrueHide the currency symbol prefix (the formatted value still uses the currency).