← All Components
<mth-loading-overlay>
Region or fullscreen loading overlay displaying an animated CSS spinner, aria-busy scrim, and localized status message over slotted content.
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-loading-overlay>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/loading-overlay"></script>
<mth-loading-overlay>Example</mth-loading-overlay>import '@methane-ui/ui/loading-overlay';
import '@methane-ui/react';
export function Example() {
return <mth-loading-overlay>Example</mth-loading-overlay>;
}<script setup lang="ts">
import '@methane-ui/ui/loading-overlay';
</script>
<template>
<mth-loading-overlay>Example</mth-loading-overlay>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/loading-overlay';
import { MthLoadingOverlayDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthLoadingOverlayDirective],
template: `<mth-loading-overlay>Example</mth-loading-overlay>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/loading-overlay';
import MthLoadingOverlay from '@methane-ui/svelte/MthLoadingOverlay.svelte';
</script>
<MthLoadingOverlay>Example</MthLoadingOverlay>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
active | active | boolean | false | Controls whether the loading overlay scrim is displayed. |
fullscreen | fullscreen | boolean | false | Pins the overlay across the full viewport (position: fixed). |
label | label | string | "" | Optional message displayed below the spinner and announced to screen readers. |
blurred | blurred | boolean | false | Applies a subtle backdrop blur over underlying content when supported. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-active-change | { active: boolean } | Fired when the active loading state toggles. |
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 |
| states | Exposes ElementInternals CustomStateSet flags: :state(active), :state(fullscreen). | Conformance suite |
| i18n | Routes 1 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |