← All Components
<mth-notification-center>
Runtime-scoped notification tray and inbox subscribing to getRuntime().notifications via NotificationStoreController with OverlayController support.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-notification-center>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/notification-center"></script>
<mth-notification-center max-items="20"></mth-notification-center>import '@methane-ui/ui/notification-center';
import '@methane-ui/react';
export function Example() {
return <mth-notification-center max-items="20"></mth-notification-center>;
}<script setup lang="ts">
import '@methane-ui/ui/notification-center';
</script>
<template>
<mth-notification-center max-items="20"></mth-notification-center>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/notification-center';
import { MthNotificationCenterDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthNotificationCenterDirective],
template: `<mth-notification-center max-items="20"></mth-notification-center>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/notification-center';
import MthNotificationCenter from '@methane-ui/svelte/MthNotificationCenter.svelte';
</script>
<MthNotificationCenter max-items="20"></MthNotificationCenter>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
open | open | boolean | false | Controls visibility when rendered as an overlay panel. |
inline | inline | boolean | false | Renders the notification list inline rather than as a floating overlay. |
heading | heading | string | "" | Optional heading overriding the localized default title. |
maxItems | max-items | number | 20 | Maximum number of visible notifications rendered in the list. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-open | undefined | Cancelable event fired before opening. |
mth-after-open | undefined | Fired after opening. |
mth-close | { reason: string } | Cancelable event fired before closing. |
mth-after-close | undefined | Fired after closing. |
mth-dismiss | { id: string } | Fired when a notification entry is dismissed. |
mth-clear | undefined | Fired when all notifications are cleared. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| Escape | both | open | Closes the notification center panel. |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | Focus ownership matches focusModel="none". | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 1 APG keyboard transitions across LTR/RTL. | mth-notification-center.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(open), :state(empty). | Conformance suite |
| i18n | Routes 6 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |