Patterns

Money

$1,250.00$1.25M$99.50—

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { Money } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<Money>

src/components/patterns/money.tsx
PropTypeDefaultDescription
valuerequirednumber | null | undefined—
compactboolean—
classNamestring—
decimalsnumber—Override the currency's decimals — whole-number prices read cleaner.
symbolstring—Escape hatch for a figure explicitly stated in another currency.

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui