MiHCM
feedback/@mihcm/ui·v0.21.0·stable

NotificationBadge

Tiny counter dot that overlays a parent (the bell icon, an inbox icon, etc.). Renders inside any position: relative container; absolutely-positions in the chosen corner.

Live preview

Adjust the controls on the right; the preview and code update in real time.

5
example.tsxtsx
import { NotificationBadge } from '@mihcm/ui/NotificationBadge';

export function Example() {
  return (
    <NotificationBadge
  max="99"
  tone="danger"
  placement="top-right"
    >
      5
    </NotificationBadge>
  );
}

Install

Both paths are valid. CLI ships the source into your repo (you own it). Install pins via npm.

npx @mihcm/cli add NotificationBadge
Copies the source into components/ds/NotificationBadge.tsx. You own the file. Use --out to override the directory or --force to overwrite.