← All Components
<mth-fullscreen-overlay>
Edge-to-edge modal <dialog> overlay built with OverlayController, FocusTrapController, and MotionController.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Uses native top-layer <dialog> with focus trap and Escape dismissal.
Ready · interact with <mth-fullscreen-overlay>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/fullscreen-overlay"></script>
<mth-fullscreen-overlay closable close-on-escape>Example</mth-fullscreen-overlay>import '@methane-ui/ui/fullscreen-overlay';
import '@methane-ui/react';
export function Example() {
return <mth-fullscreen-overlay closable close-on-escape>Example</mth-fullscreen-overlay>;
}<script setup lang="ts">
import '@methane-ui/ui/fullscreen-overlay';
</script>
<template>
<mth-fullscreen-overlay closable close-on-escape>Example</mth-fullscreen-overlay>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/fullscreen-overlay';
import { MthFullscreenOverlayDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthFullscreenOverlayDirective],
template: `<mth-fullscreen-overlay closable close-on-escape>Example</mth-fullscreen-overlay>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/fullscreen-overlay';
import MthFullscreenOverlay from '@methane-ui/svelte/MthFullscreenOverlay.svelte';
</script>
<MthFullscreenOverlay closable close-on-escape>Example</MthFullscreenOverlay>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
open | open | boolean | false | Controls whether the fullscreen overlay is open. |
label | label | string | "" | Accessible heading and dialog label. |
closable | closable | boolean | true | Renders the close button in the top header. |
closeOnEscape | close-on-escape | boolean | true | Allows dismissing the overlay with Escape. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-open | undefined | Cancelable event fired before opening the overlay. |
mth-after-open | undefined | Fired after the overlay finishes opening. |
mth-close | { reason: string } | Cancelable event fired before closing the overlay. |
mth-after-close | undefined | Fired after the overlay closes. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| Escape | both | open | Closes the fullscreen overlay and restores focus to the trigger. |
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-fullscreen-overlay.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(open). | Conformance suite |
| i18n | Routes 2 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |