TableHeaderCell
<ui5-table-header-cell> | Since 2.0.0The ui5-table-header-cell component represents a column in the ui5-table.
As it is tightly coupled to the ui5-table, it should only be used in the ui5-table-header-row
to ensure correct layout and design.
Accessibility
When the header-click event is used to open a menu or a dialog, set the aria-haspopup attribute
on the ui5-table-header-cell correspondingly.
This allows assistive technologies to properly announce the associated popup.
<ui5-table-header-cell interactive aria-haspopup="menu">Column Header</ui5-table-header-cell>
ES6 Module Import
import "@ui5/webcomponents/dist/TableHeaderCell.js";
Basic Sample
The Popin mode is a responsive design feature tailored to adapt column layouts in UI grids or tables, particularly for smaller screens or constrained container widths.
When screen space becomes limited, Popin mode seamlessly reorganizes columns. Those that cannot fit within the available width are intelligently relocated to the "popin area", an allocated space designed specifically for accommodating additional columns.
You can influence the order of columns appearing in the pop-in area by defining the importance of each column.
You can hide specific columns in the popin by using the popinHidden property on the ui5-table-header-cell.
Note: Hiding columns in the popin leads to accessibility issues as information is lost on smaller screens.
Properties
horizontalAlign
importance
interactive
minWidth
popinHidden
popinText
sortIndicator
width
Slots
action
default
Events
header-click
Methods
No methods available for this component.
CSS Parts
No CSS parts available for this component.
CSS Custom States
No CSS custom states available for this component.
More Samples
Column widths
You are able to set the width of the columns by using the width, minWidth and maxWidth property.
By default, columns will take up the available space if no width is defined. The ui5-table additionally ensures that
the columns cannot become too small.
Horizontal cell alignment
Controls the horizontal alignment of cells by using the horizontalAlign property.
Please note that the behavior of horizontalAlign depends on where you set it:
horizontalAlignis set onTableHeaderCelllevel
Changes the horizontal alignment of theTableHeaderCelland its correspondingTableCell.horizontalAlignis set onTableCelllevel only
The horizontal alignment is only changed for this oneTableCellhorizontalAlignis set at theTableHeaderCellandTableCelllevel
Changing thehorizontalAlignproperty at theTableHeaderCelllevel changes only theTableHeaderCellitself and thoseTableCellproperties without ahorizontalAlignproperty.