UI·loomora/Digit
Digit
Formats a numeric value using currency, precision, unit, locale, and sign options from the shared number utilities.
Interactive live playground
Tweak props, change states, and see the live component respond in real time.
How to call
Import directly from the Loomora package root. For projects without Tailwind CSS, ensure loomora/dist/index.css is imported once in your root layout.
import { Digit } from 'loomora'
<Digit value={12845.75} decimalsMin={2} decimalsMax={2} endUnit="USD" />API reference
Important public props and how they affect rendering.
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | string | required | Numeric amount to format. |
| decimalsMin | number | config default | Minimum fraction digits. |
| decimalsMax | number | config default | Maximum fraction digits. |
| startUnit / endUnit | ReactNode | — | Optional content before or after the formatted number. |
| currency | currency options | — | Currency display configuration. |