Indicator | Mantine

Indicator | Mantine

Display element at the corner of another element

When the target element has a fixed width, set the inline prop to add display: inline-block; styles to the Indicator container. Alternatively, you can set width and height with the style prop if you still want the root element to keep display: block .

Set offset to change the indicator position. It is useful when the Indicator component is used with children that have border-radius. You can provide a number for uniform offset or an object with x and y properties for separate horizontal and vertical offsets:

Set disabled to hide the indicator:

Set maxValue prop to display {maxValue}+ when the label exceeds the maximum value. This is useful for notification counters that should not show exact large numbers:

By default, the indicator is displayed when the label is 0 . Set showZero={false} to hide the indicator when the label is 0 :

Set autoContrast prop to automatically adjust text color based on the background color to ensure readable contrast:

Recommended articles