@cdr-kit/react-ui/DX primitives/IpPrice
<IpPrice>
Formats wei as n IP with an optional period suffix. Pass null for license-gated vaults — renders the standard alt label.
import { IpPrice } from "@cdr-kit/react-ui"
Live preview
5 IP / 30dLicense-gated
import { IpPrice } from "@cdr-kit/react-ui";
<IpPrice wei={5n * 10n ** 18n} period="/ 30d" />
<IpPrice wei={null} /> {/* "License-gated" */}Props
| Prop | Type | Default | Description |
|---|---|---|---|
| weirequired | bigint | null | — | Price in wei. null renders "License-gated". |
| period | string | — | Suffix appended after the IP value (e.g. "/ 30d"). |
| decimals | number | 4 | Max significant decimal digits in the formatted output. |