MDK Logo
UI Kitreact-devkitComponentsCoreDisplay

BtcAveragePrice

Read-only BTC average price label for reporting toolbars.

Read-only BTC average price label for reporting toolbars.

import { BtcAveragePrice } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
priceOptionalnumber | nullBTC price in USD; formatted with grouping and no decimal places. When `null`, `undefined`, non-finite, or negative, the value shows `-` (`FALLBACK` from format utils).
labelOptionalstringLabel for the BTC average price.

Usage

Read-only BTC average price readout (BTC Average Price: $97,500) for reporting toolbars. The value is formatted with formatNumber (grouping, no decimal places).

Notes

  • Styling uses the mdk-btc-average-price BEM block; no size or color variants.
  • Use a dark toolbar background so default light text remains readable.
  • price={0} renders $0.

Example

/** * Runnable example for BtcAveragePrice. */import { BtcAveragePrice } from '@tetherto/mdk-react-devkit'export const BtcAveragePriceExample = () => (  <div className="mdk-example-col">    <BtcAveragePrice price={97_500} />    <BtcAveragePrice price={null} />  </div>)