Przejdź do głównej zawartości

Interface: MoneyProps

Properties

amount

amount: number

Amount in minor units (grosze, cents). 9990 = 99.90 PLN.


as?

optional as?: "output" | "div" | "em" | "p" | "span" | "strong"

HTML element to render. Defaults to <span> so the price flows inline. Pass 'div' (or 'p') when the price is a block-level item.


className?

optional className?: string

Optional class for styling — keeps the component headless.


currency

currency: string

ISO 4217 currency code (PLN, EUR, USD, …). Required — no implicit default.


locale?

optional locale?: string

BCP 47 locale tag ('pl-PL', 'en-US', 'de-DE', …). Drives the symbol placement, decimal mark, and grouping separator. When omitted, the runtime default is used (navigator.language in browsers, LANG in Node) — pass an explicit locale for deterministic output.