Axinom Mosaic Libraries
    Preparing search index...

    Interface BadgeProps

    interface BadgeProps {
        children?: ReactNode;
        className?: string;
        content?: string | number;
        dataTestId?: string;
        max?: number;
        offset?: string | number;
        overlap?: boolean;
        position?: BadgePosition;
    }
    Index

    Properties

    children?: ReactNode

    The element the badge attaches to. The badge is positioned relative to this content.

    className?: string

    CSS Class name for additional styles.

    content?: string | number

    The value shown inside the badge, typically a notification counter. When null, undefined or an empty string, the badge is not rendered (only the children are shown).

    dataTestId?: string

    Value for the data-test-id attribute on the badge element.

    max?: number

    Caps a numeric content. When the number is greater than max, ${max}+ is displayed (e.g. max={99} renders 99+ for 100). Ignored when content is a string.

    offset?: string | number

    The distance the badge is inset from the corner it attaches to. A number is interpreted as pixels, a string is used as-is (e.g. '0.5rem').

    Only applies when overlap is false, i.e. when the badge is positioned within the bounds of the wrapped component. Ignored otherwise.

    0
    
    overlap?: boolean

    When true, the badge sits on the corner and half-overflows outside the bounds of the wrapped component (typical for notification counters). When false, the badge sits flush inside the corner.

    true
    
    position?: BadgePosition

    The corner of the wrapped component the badge attaches to.

    'top-right'