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

<mth-column-chooser>

@methane-ui/admin~10.1 KB brotli (kit + Lit)~3.2 KB marginal

Column visibility & reorder panel (<mth-column-chooser>) composing DragSortController, SelectionController, and RovingFocusController.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/admin/column-chooser"></script>
<mth-column-chooser allow-reorder allow-reset></mth-column-chooser>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
columns—ReadonlyArray<unknown>—Ordered list of column definitions with visibility and lock flags.
allowReorderallow-reorderbooleantrueEnables drag/keyboard/button column reordering.
allowResetallow-resetbooleantrueDisplays reset-defaults button.

Events

EventDetail TypeDescription
mth-change{ columns: ReadonlyArray<unknown> }Emitted when visibility or column order changes.
mth-resetRecord<string, never>Emitted when defaults are restored.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
ArrowDownbothcolumn list has focusmoves focus to next column row
ArrowUpbothcolumn list has focusmoves focus to previous column row
Spacebothdrag-sort row has focusgrabs/drops column for arrow reorder

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 3 APG keyboard transitions across LTR/RTL.mth-column-chooser.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(empty).Conformance suite
i18nRoutes 6 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test