Cell & Header Tooltips
Show the full value on hover — automatically when text is truncated, or with your own text per column. Works on cells, header cells, and column-group headers, with no wrapper component to add.
The default is zero-config
No tooltip options at all. Hover a Name or an Email — they are too narrow for their values, so the full text appears. Hover a Status, which fits, and nothing does.
There is no tooltip option anywhere in this example's code. Hovering a cell whose text is cut off shows the full value; text that already fits shows nothing. Name and Email are deliberately too narrow, Status is not.
Drag the edge of Name wider and the tooltip stops appearing on the rows that now fit — the measurement is taken on each hover, not cached from the first render.
The text always matches the screen
Salary has a valueFormatter, and the automatic tooltip shows
$142,000 — the formatted text, never the raw 142000 underneath. An automatic
tooltip cannot drift from what the reader is looking at, because it is what they are
looking at.
Customizing the text
The same grid with four answers on four columns: a fixed string, a per-row function, a function that hands some rows back to the default, and a column with tooltips switched off.
Four columns, four answers, and the one that is easy to miss is the third:
#—tooltip: false. Off. Truncated or not, nothing appears.- Dept. — a fixed string. The same helper text on every row, whatever the cell says.
- Salary — a function.
(row, column) => string. The cell reads $142,000 and the tooltip says when the figure was last reviewed. A tooltip is free to say something the cell does not. - Name — a function that returns
nullfor most rows. Returningnullor''hands that row back to the default: hover an On leave row for the custom line, any other row for the plain truncated name. Per row, not per column.
One column on the native tooltip
Email sets tooltipNative: true, so it uses the browser's own
title instead of the styled box — no delay of ours, no theme, and no rich content,
but zero JavaScript and it works anywhere. config.tooltip.native does the same for
every column at once.
Rich content
Salary points tooltipTemplate at a template and gets a themed, multi-line card. It also declares a plain-string tooltip, which the template beats — the precedence is fixed, not a coin toss.
Point column.tooltipTemplate at a template and the tooltip becomes a themed card
instead of a line of text — the same ergonomic as cellTemplate, with the same
context. Hover a Salary cell.
Precedence is fixed, and this column proves it
Salary declares a tooltip string and a
tooltipTemplate. You will never see the string. The order is:
tooltip: false → nothing
tooltipTemplate → the template
tooltip → the string or the function's return
otherwise → the automatic truncation text
Worth knowing before you debug a tooltip that "ignores" the text you set: a leftover
tooltipTemplate outranks it.
Headers and column groups
Tooltips on the chrome rather than the data: a string on one header, a template on another, and one on a group's spanning header — which behaves differently from a leaf header by design.
column.headerTooltip takes the same shapes as column.tooltip — string,
function, or false — and applies to the header cell. Name carries a
fixed one. headerTooltipTemplate is the rich version: hover Status,
whose context is { column, sortDir } rather than a row, because a header has no row.
A group header is not a leaf header
Hover Compensation. A group's spanning header takes a headerTooltip
too, and this one sets it — but the default differs from everything else on this page:
- A leaf header with no
headerTooltipspeaks only when its label is cut off, exactly like a cell. - A group header with no
headerTooltipshows the group's own name always, truncated or not.
So setting headerTooltip on a group replaces a tooltip that was already there, while
setting it on a leaf header usually adds one that was not.
How tooltips work
Tooltips are styled to match your theme, positioned so they are never clipped by the grid's scroll
area, and shown on keyboard focus as well as hover — with nothing to import and no wrapper to add.
Every column and header supports one, driven by two per-column options,
column.tooltip and column.headerTooltip.
Prefer the plain browser tooltip? Set config.tooltip.native to true, or
column.tooltipNative for a single column, as the second example does. It is zero-JS
and works on SSR, at the cost of theming and rich content.
Tuning it once, for the whole grid
config.tooltip takes the options every tooltip on the grid shares. All four examples
above set one — a slightly quicker showDelay than the default:
tooltip: { showDelay: 300 } // default 400
showDelay— ms before it appears. Default400.hideDelay— ms before it leaves. Default100.placement—'auto','top'or'bottom'. It auto-flips at a viewport edge whatever you ask for.maxWidth— px. Default320.native— the browser'stitlefor every column.tooltip: falseat grid level turns every tooltip off, including the automatic ones.
Tooltip options
| Property | Type | Default | Description |
|---|---|---|---|
| column.tooltip | boolean | string | (row, column) => string | null | auto | Cell tooltip. Omitted/true = show the full text only when truncated; false = off; string = fixed text; function = per-row text (return null/"" to fall back to auto for that row). |
| column.tooltipTemplate | TemplateRef<CellContext> | — | Rich, themed cell tooltip via a template. Outranks a string/function tooltip. Same context as cellTemplate. |
| column.headerTooltip | boolean | string | (column) => string | null | auto | Tooltip for the column's header cell. Same shapes as column.tooltip; the automatic case shows the label only when it is truncated. |
| column.headerTooltipTemplate | TemplateRef<HeaderContext> | — | Rich, themed header tooltip via a template. Context is { column, sortDir } — a header has no row. |
| column.tooltipNative | boolean | false | Use the plain browser title for this column, overriding config.tooltip.native. |
| GridColumnGroup.headerTooltip | string | (() => string | null) | the group's name | Tooltip for a column group's spanning header. Unlike a leaf header, the default shows the group's own name on every hover, truncated or not — setting this replaces it. |
| config.tooltip | boolean | GridTooltipConfig | true | Grid-level options. false = off entirely; { native, showDelay, hideDelay, placement, maxWidth } to tune. |
| config.tooltip.showDelay | number | 400 | Milliseconds before a tooltip appears on hover or focus. |
| config.tooltip.hideDelay | number | 100 | Milliseconds before it hides after the pointer or focus leaves. |
| config.tooltip.placement | 'auto' | 'top' | 'bottom' | 'auto' | Preferred side. It auto-flips at a viewport edge regardless of this hint. |
| config.tooltip.maxWidth | number | 320 | Maximum width of the tooltip box, in px. |