mithril-materialized
    Preparing search index...

    Variable BadgeConst

    Badge: FactoryComponent<BadgeAttrs> = ...

    Badge component

    Displays a badge anchored to a child element. Commonly used for notifications, counts, or status indicators. Supports flexible positioning, colors, and variants.

    // Basic notification badge
    m(Badge, { badgeContent: 5 },
    m('button.btn', 'Messages')
    )

    // Dot badge on avatar
    m(Badge, {
    variant: 'dot',
    color: 'green',
    overlap: 'circular'
    },
    m('img.circle', { src: 'avatar.jpg' })
    )