BU01 Basic Grid
Display tabular data with columns, formatting, and styling
Live Demo
Striped rows, row numbers, formatted salary, and high-value highlighting.
Code
Key Features
Required Properties
columns - Array of column definitions
items - Array of data objects
Column Definition
field- Property name in datatitle- Header textwidth/minWidth/maxWidthhorizontalAlign- left, center, right, justifyverticalAlign- top, middle, bottomheaderHorizontalAlign/headerVerticalAlignheaderInfo- tooltip icon next to headertextOverflow- 'wrap' | 'ellipsis'maxLines- line-clamp (with textOverflow: 'wrap')cellClass- static CSS class per column
Display Options
isStriped - Alternate row colors
isHoverable - Highlight on hover
isRowNumbersVisible - Show row index
isStickyRowNumbers - Freeze row numbers
isFilterable - Enable column filtering
freezeColumns - Freeze N columns from left
tableBorderOnly - Border only around table
focusedRowIndex - Track focused row
sortMode - 'none' | 'single' | 'multi'
Content Rendering
formatCallback(value, row) - Return display string
templateCallback(row) - Return HTML string for the cell
renderCallback(row, element) - Imperative DOM rendering into the element
Styling
cellClassCallback(value, row) - Dynamic CSS classes
rowClassCallback(row, index) - Dynamic row classes
customStylesCallback - Inject CSS into shadow DOM
Grid Modes
Use mode for quick setup: 'read-only', 'excel', or 'input-matrix'