#Overview
The <RemainingGauge /> provides a visual representation of the available product quantity,
indicating how many items remain for purchase.
| Name | Type | Default | Description | Controls |
|---|---|---|---|---|
| label * | ReactNode | - | Label text above the gauge | |
| value * | number |
| The value visually represented with the gauge. Range from 0 to 1 (inclusive) | |
| shortage | boolean |
| Highlighting state, for low amount remaining, or sold out | |
| variant | "secondary" | "standard" |
| Visual variant of the gauge |
#Full availability
Show codeHide code
<RemainingGauge
value={1}
label={
<>
<strong>100</strong> out of 100 available
</>
}
/>;
#Half availability
Show codeHide code
<RemainingGauge
value={0.5}
label={
<>
<strong>50</strong> out of 100 available
</>
}
/>;
#Only a few available
Show codeHide code
<RemainingGauge
value={0.02}
label={
<>
<strong>2</strong> out of 100 available
</>
}
shortage
/>;
#Sold out
Show codeHide code
<RemainingGauge
value={0}
label={
<>
<strong>Gone</strong> 100 sold
</>
}
/>;
#Colors
Generated from Figma Showcase
- Token name
TEXT#000#fff#059#fffBAR_BACKGROUND#0001#fff2#0001#fff2REMAINING_BACKGROUND#e64#f75#059#fffTEXT_FEW#000#fff#e02#f55BAR_BACKGROUND_FEW#0001#fff2#0001#fff2REMAINING_BACKGROUND_FEW#e64#f75#e02#f55TEXT_SOLDOUT#f0f#f0f#f0f#f0fBAR_BACKGROUND_SOLDOUT#f0f#f0f#f0f#f0fTEXT_SECONDARY#000#fff#059#fffBAR_BACKGROUND_SECONDARY#0001#fff2#0001#fff2REMAINING_BACKGROUND_SECONDARY#a7d#b8d#059#fffTEXT_FEW_SECONDARY#000#fff#e02#f55BAR_BACKGROUND_FEW_SECONDARY#0001#fff2#0001#fff2REMAINING_BACKGROUND_FEW_SECONDARY#a7d#b8d#e02#f55TEXT_SOLDOUT_SECONDARY#000#fff#059#fffBAR_BACKGROUND_SOLDOUT_SECONDARY#0001#fff2#0001#fff2REMAINING_BACKGROUND_DEPRECATED#7C4#8D6#059#fff