Skip to main content

Tooltips

Tooltips come from a field, a computed value, or a custom component — on body cells and headers — with grid-wide positioning and interaction options. Clipped cell text gets an automatic tooltip with no configuration at all.

Loading interactive example…
React
const columns: ReactColDef[] = [
{ key: "owner", label: "Owner", tooltipField: "ownerEmail" },
{
key: "revenue",
label: "Revenue",
tooltipValueGetter: ({ value, data }) => data.customer + ": $" + value,
},
{ key: "margin", label: "Margin", headerTooltip: "Revenue minus direct cost" },
];

<Grid
rowData={rows}
columnDefs={columns}
tooltip={{ showDelay: 150, hideDelay: 75, mode: "anchored", placement: "auto" }}
/>

Field and computed body tooltips​

const columnDefs: ColDef[] = [
{ key: "owner", label: "Owner", tooltipField: "ownerEmail" },
{
key: "revenue",
label: "Revenue",
tooltipValueGetter: ({ value, data }) => `${data.account}: $${value}`,
},
];

When no explicit content is configured, clipped cell text gets an automatic tooltip. Set suppressAutoTooltip: true on a column to opt it out.

Header tooltip​

const column = {
key: "margin",
label: "Margin",
headerTooltip: "Revenue minus direct cost",
} satisfies ColDef;

Custom body tooltip​

const accountTooltip = ({ data }) => {
const card = document.createElement("div");
card.innerHTML = `<strong>${data.account}</strong><br>${data.owner}`;
return card;
};

const column = {
key: "account",
label: "Account",
tooltipComponent: accountTooltip,
} satisfies ColDef;

The React and Angular bindings accept framework components in the same tooltipComponent slot.

Position and interaction​

const options = {
tooltip: {
showDelay: 150,
hideDelay: 75,
mode: "anchored",
placement: "auto",
interactive: true,
escapeRootClip: true,
},
} satisfies GridOptions;

A column may override mode, placement, interactive, and escapeRootClip through tooltipOptions. Interactive content is always anchored; non-interactive content may use mode: "follow".

escapeRootClip and theming

escapeRootClip: true mounts the floating element outside the grid root so it is not clipped near the grid edge — in document.body, or in the grid's own shadow root when the grid is mounted inside one. It is still styled as if it were inside the root: the grid's theme variables are mirrored onto it (and follow a theme change while it is open), so every tooltip* theme param applies. See Popups outside the grid root.

Tooltip API and events​

api.showTooltip({ rowId: "order-1", colId: "owner" });
api.hideTooltip();

const unsubscribe = api.on("tooltipShow", (event) => console.log(event));
unsubscribe();

Set tooltip: false to disable body, header, and automatic tooltips globally.