DataTableHeaders

Data Display
stable

Header row container that renders all column header cells, an optional progress loader, and switches to mobile layout when the breakpoint is reached.

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamDataTableHeadersSchematic of DataTableHeaders with 3 internal parts. th cell th cell th cell 1 2 3 origam-data-table-headers
Anatomy of <origam-data-table-headers> — 3 parts: root row container ①, individual header cells ②, and optional loader row ③.
1.origam-data-table-headers
Root element rendered by either OrigamDataTableHeadersCell (desktop) or OrigamDataTableHeadersCellMobile (mobile). Has --sticky BEM modifier.
2DataTableHeadersCell / DataTableHeadersCellMobile
Desktop renders multi-row <tr> elements with DataTableHeaderCell per column. Mobile renders a single merged row with sort/filter UI.
3.origam-data-table-headers--progress
Additional <tr> row rendered conditionally when loading is active and loader kind is not "skeleton". Contains a full-width <th> with OrigamProgress.

API

Props

All props accepted by this component, with their type, default value and description.

id
string
class
string | Array<string> | object
bgColor
Background colour applied to header cells.
style
string | Array<string> | object | StyleValue
color
Foreground colour passed through to each DataTableHeaderCell and to the progress loader.
mobileBreakpoint
number | TBreakpoint
Viewport width threshold below which the mobile header layout is used.
loading
TLoadingValue
false
When truthy, renders a progress bar in a dedicated row below the header. Accepts true (default line), "skeleton", "circular" or a percentage number.
loadingText
string
tag
string
disableSort
boolean
false
Disables sort toggling on all header cells.
headerProps
any
mobile
boolean
false
Forces mobile layout regardless of viewport width.
sticky
boolean
false
Makes the header sticky. Applies the --sticky BEM modifier and position: sticky to all header cells.
multiSort
boolean
false
Enables multi-column sorting. Passed through to each DataTableHeaderCell.
sortAscIcon
Custom ascending sort icon forwarded to each header cell.
sortDescIcon
Custom descending sort icon forwarded to each header cell.

API

Slots

Content slots exposed by this component.

#mobile
Overrides the mobile header cell rendering (shown when mobile=true or viewport < mobileBreakpoint).
#default
Overrides the desktop (non-mobile) header cell rendering. Receives full sort and selection context.
#loader
Replaces the default OrigamProgress bar shown during loading. Rendered in a full-width th below the header.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to child header cell components.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document.
() => void
Removes the injected style sheet.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Default header cell text colour (inherited from DataTableHeaderCell).
Default header cell background (inherited from DataTableHeaderCell).

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

ARIA roles

rowgroup

Keyboard interactions

Keyboard interactions
KeyAction
TabMoves focus through sortable header cells and the select-all checkbox.

Notes

  • Each sortable header cell exposes <code>aria-sort</code> ("ascending", "descending", or "none") on the <code>&lt;th&gt;</code> element.
  • When loading, the progress row is inserted inside a <code>&lt;thead&gt;</code> scope, giving screen readers the context that loading is related to the table header.

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

Source
color
var(--origam-color__surface---raised)
Header row background colour.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

This is an internal sub-part: it is injected by its parent component and cannot render on its own. See the parent component page for a live example.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Sticky headers (via DataTable)

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.