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

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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

Emplacements de contenu exposés par ce composant.

#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

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<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.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

rowgroup

Interactions clavier

Interactions clavier
ToucheAction
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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Sous-partie interne : elle est injectée par son composant parent et ne peut pas se rendre seule. Voir la fiche du composant parent pour un exemple vivant.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Sticky headers (via DataTable)

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.