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 ply-input-group — it is a composite control.

freenew

Playground

HTML

<ply-currency-input currency="USD" locale="en-US" placeholder="0.00">Currency Input</ply-currency-input>

USD and EUR

Bind with ngModel like any other CVA control.

Value: 1299

Value: 49.99

Installation

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

bash

npx ply-ui-cli add currency-input

API Reference

For AI agents

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

bash

npx -y ply-ui-mcp

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

typescript (Example)

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