← All Components
<mth-spinner>
Accessible indeterminate loading spinner with localized role="status" label and prefers-reduced-motion 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-spinner>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/spinner"></script>
<mth-spinner size="xs"></mth-spinner>import '@methane-ui/ui/spinner';
import '@methane-ui/react';
export function Example() {
return <mth-spinner size="xs"></mth-spinner>;
}<script setup lang="ts">
import '@methane-ui/ui/spinner';
</script>
<template>
<mth-spinner size="xs"></mth-spinner>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/spinner';
import { MthSpinnerDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthSpinnerDirective],
template: `<mth-spinner size="xs"></mth-spinner>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/spinner';
import MthSpinner from '@methane-ui/svelte/MthSpinner.svelte';
</script>
<MthSpinner size="xs"></MthSpinner>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
size | size | 'xs' | 'sm' | 'md' | 'lg' | "md" | Spinner diameter preset (xs | sm | md | lg). |
label | label | string | "" | Accessible loading announcement; defaults to localized "Loading" when empty. |
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 |
| i18n | Routes 1 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |