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

<mth-review-summary>

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

Aggregate rating summary with 5-to-1 distribution bars rendered via adopted CSSStyleSheet and interactive star-filter toggles.

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-review-summary> (@methane-ui/commerce)
Ready · interact with <mth-review-summary>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/commerce/review-summary"></script>
<mth-review-summary average="0" total-reviews="0"></mth-review-summary>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
averageaveragenumber0Average rating value.
totalReviewstotal-reviewsnumber0Total number of reviews.
breakdown—Record<number, number>—Map from star rating (1..5) to review count.
activeStaractive-starnumber | nullnullCurrently active star filter, or null when unfiltered.
maxStarsmax-starsnumber5Maximum rating scale (default 5).
labellabelstring""Accessible region label overriding localized default.

Events

EventDetail TypeDescription
mth-rating-filter{ star: number | null }Emitted event mth-rating-filter.

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(filtered), :state(empty).Conformance suite
i18nRoutes 6 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test