Skip to main content

Quantity Indicator

The Quantity Indicator displays contextual quantities and can be used alongside other components such as a button or icon.

Examples

Default

Secondary

Summary of Functionality

  • The QuantityIndicator provides a wrapper for positioning a visual quantity indicator relative to another component like a button or icon.

  • The QuantityIndicatorValue displays the quantity with a customizable appearance.

  • The Button acts as a trigger for an action like opening a cart drawer or linking elsewhere.


Props

NameDescriptionType
onClickCallback when the button is clickedFunction
classNameAdditional CSS classes for the buttonString
childrenThe children of the quantity indicatorReactNode
...propsAdditional props for the buttonObject

Variants

VariantDescriptionValues
variantControls the visual style of the badge
  • default
  • secondary
sizeControls the size of the indicator
  • default
  • sm
  • lg

Customization

The approach for customization will vary depending on if the customization is intended to be global for all consumers of the UI component or if it is only an override for a particular instance.

  • If the customization is necessary for all users, update the source code in the UI component library directly.
  • Otherwise, pass className overrides.