@methane-ui/primitives ~3.2 KB brotli (primitives + UIElement) ~0.9 KB marginal Screen-reader-only Light-DOM wrapper using CSS logical properties.
When NOT to use: Do not use <mth-visually-hidden> on interactive elements that must stay visible when focused; use <mth-skip-link> or native focusable controls.
Live Interactive Preview ★ BookmarkSave Methane component documentation bookmark
Ready · interact with <mth-visually-hidden>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets HTML React 19 Vue Angular Svelte 5 Copy
<script type="module" src="@methane-ui/primitives"></script>
<mth-visually-hidden>Example</mth-visually-hidden>import '@methane-ui/primitives';
import '@methane-ui/react';
export function Example() {
return <mth-visually-hidden>Example</mth-visually-hidden>;
}<script setup lang="ts">
import '@methane-ui/primitives';
</script>
<template>
<mth-visually-hidden>Example</mth-visually-hidden>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/primitives';
import { MthVisuallyHiddenDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthVisuallyHiddenDirective],
template: `<mth-visually-hidden>Example</mth-visually-hidden>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/primitives';
import MthVisuallyHidden from '@methane-ui/svelte/MthVisuallyHidden.svelte';
</script>
<MthVisuallyHidden>Example</MthVisuallyHidden>Properties & Attributes Property Attribute Type Default Description
Accessibility Checklist Category Requirement Verified By aria All aria-* IDREFs resolve within the same DOM root (ADR-003). scanSameRootAriafocus Focus ownership matches focusModel="none". lint-plugin & spec-compilercontrast Renders legible borders, focus outlines, and selection indicators under forced-colors: active. Playwright forced-colors matrix