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
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | string | - | Current numeric value. |
onChange | (value: number) => void | - | Called with the parsed value. |
prefix | string | "USD" | Currency prefix label. |

