JB logo

Command Palette

Search for a command to run...

yOUTUBE
Components
PreviousNext

Currency Input

Formatted currency input with comma separators and configurable prefix.

Installation

pnpm dlx shadcn@latest add https://jb.desishub.com/r/currency-input.json

Usage

import { CurrencyInput } from "@/components/currency-input";
const [amount, setAmount] = useState(0);
 
<CurrencyInput value={amount} onChange={setAmount} prefix="USD" />
<CurrencyInput value={amount} onChange={setAmount} prefix="UGX" />

Props

PropTypeDefaultDescription
valuenumber | string-Current numeric value.
onChange(value: number) => void-Called with the parsed value.
prefixstring"USD"Currency prefix label.