Blokd UIDocsv1.1.0

Docs / Component reference

CurrencyInput

Enter an amount with its currency in view. Leave the field to see how the component formats the precision.

Currency input example

Install

sh
npx @fierst/blokd-ui@1.1.0 add currency-input

Registry dependencies: theme.

Exports from ./ui/currency-input: CurrencyInput.

Download the registry source for currency-input 1.1.0.

API contracts

ts
export function* CurrencyInput(
  props: {
    label?: string;
    currency?: 'USD' | 'EUR' | 'GBP' | 'JPY' | 'CAD';
    value?: number;
    defaultValue?: number;
    placeholder?: string;
    onChange?: (amount: number) => void;
    class?: string;
  },
  ctx: Ctx,
)