#Overview

The <RemainingGauge /> provides a visual representation of the available product quantity, indicating how many items remain for purchase.

NameTypeDefaultDescriptionControls
label *ReactNode
-

Label text above the gauge

value *number
-

The value visually represented with the gaugae. Range from 0 to 1 (inclusive)

shortageboolean
-

Highlighting state, for low amount remaining, or sold out

#Full availability

Show codeHide code
<RemainingGauge
  value={1}
  label={
    <>
      <strong>100</strong>&nbsp;out of 100 available
    </>
  }
/>;

#Half availability

Show codeHide code
<RemainingGauge
  value={0.5}
  label={
    <>
      <strong>50</strong>&nbsp;out of 100 available
    </>
  }
/>;

#Only a few available

Show codeHide code
<RemainingGauge
  value={0.02}
  label={
    <>
      <strong>2</strong>&nbsp;out of 100 available
    </>
  }
  shortage
/>;

#Sold out

Show codeHide code
<RemainingGauge
  value={0}
  label={
    <>
      <strong>Gone</strong>&nbsp;100 sold
    </>
  }
/>;

#Colors

  • Token
  • BAR_BACKGROUND#0001#fff2#0001#fff2
  • BAR_BACKGROUND_FEW#0001#fff2#0001#fff2
  • BAR_BACKGROUND_SOLDOUT#0001#fff2#0001#fff2
  • REMAINING_BACKGROUND#7c4#8d6#059#fff
  • REMAINING_BACKGROUND_FEW#e64#f75#e02#f55
  • TEXT#000#fff#059#fff
  • TEXT_FEW#c42#f75#e02#f55
  • TEXT_SOLDOUT#000#fff#059#fff