Skip to content

HeaderContentDefinition

Header content definition for plugins contributing to shell header center section.

Register via grid.registerHeaderContent() to add content between the title and toolbar buttons.

grid.registerHeaderContent({
id: 'row-count',
order: 10,
render: (container) => {
const span = document.createElement('span');
span.className = 'row-count';
span.textContent = `${grid.rows.length} rows`;
container.appendChild(span);
// Update on data changes
const unsub = grid.on('data-change', () => {
span.textContent = `${grid.rows.length} rows`;
});
return () => {
unsub();
};
},
});
PropertyTypeDescription
idstringUnique content ID
render(container: HTMLElement) => void | () => voidContent factory - called once when shell header renders
onDestroy?() => voidCalled when content is removed (for cleanup)
order?numberOrder priority (lower = first, default: 100)
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt