#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

0

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

shortageboolean

false

Highlighting state, for low amount remaining, or sold out

variant"secondary" | "standard"

"standard"

Visual variant of the gauge

#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

Generated from Figma Showcase
  • Token name
  • TEXT#000#fff#059#fff
  • BAR_BACKGROUND#0001#fff2#0001#fff2
  • REMAINING_BACKGROUND#e64#f75#059#fff
  • TEXT_FEW#000#fff#e02#f55
  • BAR_BACKGROUND_FEW#0001#fff2#0001#fff2
  • REMAINING_BACKGROUND_FEW#e64#f75#e02#f55
  • TEXT_SOLDOUT#f0f#f0f#f0f#f0f
  • BAR_BACKGROUND_SOLDOUT#f0f#f0f#f0f#f0f
  • TEXT_SECONDARY#000#fff#059#fff
  • BAR_BACKGROUND_SECONDARY#0001#fff2#0001#fff2
  • REMAINING_BACKGROUND_SECONDARY#a7d#b8d#059#fff
  • TEXT_FEW_SECONDARY#000#fff#e02#f55
  • BAR_BACKGROUND_FEW_SECONDARY#0001#fff2#0001#fff2
  • REMAINING_BACKGROUND_FEW_SECONDARY#a7d#b8d#e02#f55
  • TEXT_SOLDOUT_SECONDARY#000#fff#059#fff
  • BAR_BACKGROUND_SOLDOUT_SECONDARY#0001#fff2#0001#fff2
  • REMAINING_BACKGROUND_DEPRECATED#7C4#8D6#059#fff