← All Components
<mth-tab-panel>
Content region controlled by an <mth-tab> inside <mth-tabs>.
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-tab-panel>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/tab-panel"></script>
<mth-tab-panel>Example</mth-tab-panel>import '@methane-ui/ui/tab-panel';
import '@methane-ui/react';
export function Example() {
return <mth-tab-panel>Example</mth-tab-panel>;
}<script setup lang="ts">
import '@methane-ui/ui/tab-panel';
</script>
<template>
<mth-tab-panel>Example</mth-tab-panel>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/tab-panel';
import { MthTabPanelDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthTabPanelDirective],
template: `<mth-tab-panel>Example</mth-tab-panel>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/tab-panel';
import MthTabPanel from '@methane-ui/svelte/MthTabPanel.svelte';
</script>
<MthTabPanel>Example</MthTabPanel>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value | string | "" | Identifier matching the associated <mth-tab> value. |
active | active | boolean | false | Shows the panel when true; hides it from layout and assistive technology otherwise. |
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" with host role="tabpanel". | 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). | Conformance suite |