← All Components
<mth-column>
Declarative column definition element (<mth-column>) consumed by <mth-table> via SlotCollectionController.
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>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/column"></script>
<mth-column filterable width="null">Example</mth-column>import '@methane-ui/ui/column';
import '@methane-ui/react';
export function Example() {
return <mth-column filterable width="null">Example</mth-column>;
}<script setup lang="ts">
import '@methane-ui/ui/column';
</script>
<template>
<mth-column filterable width="null">Example</mth-column>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/column';
import { MthColumnDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthColumnDirective],
template: `<mth-column filterable width="null">Example</mth-column>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/column';
import MthColumn from '@methane-ui/svelte/MthColumn.svelte';
</script>
<MthColumn filterable width="null">Example</MthColumn>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
field | field | string | "" | Property key read from each row record. |
header | header | string | "" | Visible column header text. |
sortable | sortable | boolean | false | Enables interactive sorting for this column. |
filterable | filterable | boolean | true | Includes this column in global text filtering. |
width | width | number | null | null | Optional explicit column width in pixels. |
minWidth | min-width | number | null | null | Optional minimum column width in pixels. |
pin | pin | 'left' | 'right' | null | null | Optional column pinning side (left, right, or null). |
align | align | 'start' | 'center' | 'end' | "start" | Logical cell text alignment (start, center, end). |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | Focus ownership matches focusModel="none". | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| states | Exposes ElementInternals CustomStateSet flags: :state(sortable), :state(pinned). | Conformance suite |
| i18n | Routes 1 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |