Money inputforms
Amount input with currency minor units, locale grouping while typing, caret-safe editing, formatted paste and a number or null value.
설치
pnpm
pnpm dlx shadcn@4.23.0 add @uikit/money-input의존 아이템input-grouplocalestyle
Currencies
money-input-currencies.tsx
import { LocaleProvider } from "@/lib/locale";import { MoneyInput } from "@/components/ui/money-input";
export default function MoneyInputCurrencies() { return ( <div className="flex w-64 flex-col gap-2"> <LocaleProvider locale="de-DE" currency="EUR"> <MoneyInput aria-label="Euro" defaultValue={1234.5} /> </LocaleProvider> <MoneyInput aria-label="Yen" currency="JPY" defaultValue={12000} /> <MoneyInput aria-label="Adjustment" allowNegative defaultValue={-20} /> </div> );}