Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-notification-bell>

@methane-ui/chat~10.1 KB brotli (kit + Lit)~3.2 KB marginal

Notification bell trigger with unread badge and accessible anchored notification feed popover.

When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.

Live Interactive Preview

Interactive StageLive Custom Element · <mth-notification-bell> (@methane-ui/chat)
Ready · interact with <mth-notification-bell>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/chat/notification-bell"></script>
<mth-notification-bell placement="bottom-end" offset="8"></mth-notification-bell>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
openopenbooleanfalseControls open visibility of the notification popover.
placementplacementstring"bottom-end"Preferred popover placement relative to the bell button.
offsetoffsetnumber8Pixel offset between bell trigger and notification panel.
closeOnEscapeclose-on-escapebooleantrueAllows dismissing the panel with the Escape key.
forceFallbackforce-fallbackbooleanfalseForces non-top-layer positioning fallback mode.
unreadCountunread-countnumber | nullnullOptional explicit unread count overriding computed item count.
maxCountmax-countnumber99Maximum unread count before appending +.
useStoreuse-storebooleantrueSubscribes to the shared @methane-ui/core runtime notification store.
labellabelstring""Optional accessible label for the notification bell button.
items—ReadonlyArray<unknown>—Structured list of notification items rendered in the panel.

Events

EventDetail TypeDescription
mth-openvoidCancelable event emitted before opening the notification panel.
mth-after-openvoidEmitted after opening completes.
mth-close{ reason: string }Cancelable event emitted before closing the notification panel.
mth-after-close{ reason: string }Emitted after closing completes.
mth-item-select{ id: string }Emitted when the user activates a notification item.
mth-item-dismiss{ id: string }Emitted when a notification item is dismissed.
mth-mark-all-readvoidEmitted when the user activates Mark all read.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
Escapebothnotification panel is open and closeOnEscape is truecloses the notification panel and restores focus to the trigger button

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusdelegatesFocus: true with zero host internals.role (ADR-014).lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
keyboardImplements all 1 APG keyboard transitions across LTR/RTL.mth-notification-bell.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(open), :state(unread).Conformance suite
i18nRoutes 9 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test