← All Components
<mth-column-chooser>
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
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>import '@methane-ui/admin/column-chooser';
import '@methane-ui/react';
export function Example() {
return <mth-column-chooser allow-reorder allow-reset></mth-column-chooser>;
}<script setup lang="ts">
import '@methane-ui/admin/column-chooser';
</script>
<template>
<mth-column-chooser allow-reorder allow-reset></mth-column-chooser>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/admin/column-chooser';
import { MthColumnChooserDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthColumnChooserDirective],
template: `<mth-column-chooser allow-reorder allow-reset></mth-column-chooser>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/admin/column-chooser';
import MthColumnChooser from '@methane-ui/svelte/MthColumnChooser.svelte';
</script>
<MthColumnChooser allow-reorder allow-reset></MthColumnChooser>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
columns | — | ReadonlyArray<unknown> | — | Ordered list of column definitions with visibility and lock flags. |
allowReorder | allow-reorder | boolean | true | Enables drag/keyboard/button column reordering. |
allowReset | allow-reset | boolean | true | Displays reset-defaults button. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-change | { columns: ReadonlyArray<unknown> } | Emitted when visibility or column order changes. |
mth-reset | Record<string, never> | Emitted when defaults are restored. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| ArrowDown | both | column list has focus | moves focus to next column row |
| ArrowUp | both | column list has focus | moves focus to previous column row |
| Space | both | drag-sort row has focus | grabs/drops column for arrow reorder |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 3 APG keyboard transitions across LTR/RTL. | mth-column-chooser.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(empty). | Conformance suite |
| i18n | Routes 6 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |