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

<mth-filter-builder>

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

Interactive AND/OR filter rule builder (<mth-filter-builder>) for admin tables and search views.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/admin/filter-builder"></script>
<mth-filter-builder combinator="and"></mth-filter-builder>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
combinatorcombinator'and' | 'or'"and"Logical combinator joining rules (and or or).
fields—ReadonlyArray<unknown>—Available filterable field definitions.
rules—ReadonlyArray<unknown>—Active filter rules array.
disableddisabledbooleanfalseDisables all interactive rule controls.

Events

EventDetail TypeDescription
mth-change{ combinator: 'and' | 'or'; rules: ReadonlyArray<unknown> }Emitted when rules or combinator change.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
Enterbothfocus is on add/remove rule controlsadds or removes the target filter rule

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusdelegatesFocus: true with zero host internals.role (ADR-014).lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
keyboardImplements all 1 APG keyboard transitions across LTR/RTL.mth-filter-builder.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(disabled), :state(empty).Conformance suite
i18nRoutes 19 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test