← All Components
<mth-callout>
Editorial documentation callout block (note, tip, info, warning, danger) with optional collapsible body and semantic role="note".
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-callout>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/callout"></script>
<mth-callout variant="info" open>Example</mth-callout>import '@methane-ui/ui/callout';
import '@methane-ui/react';
export function Example() {
return <mth-callout variant="info" open>Example</mth-callout>;
}<script setup lang="ts">
import '@methane-ui/ui/callout';
</script>
<template>
<mth-callout variant="info" open>Example</mth-callout>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/callout';
import { MthCalloutDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthCalloutDirective],
template: `<mth-callout variant="info" open>Example</mth-callout>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/callout';
import MthCallout from '@methane-ui/svelte/MthCallout.svelte';
</script>
<MthCallout variant="info" open>Example</MthCallout>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
variant | variant | 'info' | 'note' | 'tip' | 'warning' | 'danger' | "note" | Semantic variant (note, tip, info, warning, or danger). |
heading | heading | string | "" | Optional heading overriding the default localized variant title. |
collapsible | collapsible | boolean | false | Enables a header button to expand/collapse the callout body. |
open | open | boolean | true | Controls whether the callout body is expanded when collapsible is enabled. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-toggle | { open: boolean } | Fired when the collapsible callout 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(collapsed). | Conformance suite |
| i18n | Routes 6 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |