Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-card>

@methane-ui/ui~6.8 KB brotli (cold + Lit)~1.4 KB marginal

Surface container card with elevated, outlined, and subtle variants, interactive affordances, and structured slots.

When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.

Live Interactive Preview

Interactive StageLive Custom Element · <mth-card> (@methane-ui/ui)
Precision Studio Surface

Layered key-light and ambient elevation with crisp OKLCH border contrast.

CancelDeploy
Ready · interact with <mth-card>, or toggle Theme, Direction (LTR/RTL), or props above.

Live Variants & States Showcase

variant="elevated"Elevated Card

Multi-stop ambient shadow surface.

variant="outlined"Outlined Card

Crisp architectural hairline border.

variant="subtle" interactiveSubtle Interactive

Recessed card with hover elevation.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/card"></script>
<mth-card variant="elevated">Example</mth-card>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
variantvariant'elevated' | 'outlined' | 'subtle'"elevated"Surface elevation and border style (elevated | outlined | subtle).
interactiveinteractivebooleanfalseApplies interactive hover/focus-within affordances.

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusFocus ownership matches focusModel="none".lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
statesExposes ElementInternals CustomStateSet flags: :state(interactive).Conformance suite