Skip to content

ToolbarContentDefinition

Since v1.0.0

Toolbar content definition for the shell header toolbar area. Register via the shell plugin’s registerToolbarContent() or use light DOM <tbw-grid-tool-buttons>.

grid.getPluginByName('shell')?.registerToolbarContent({
id: 'my-toolbar',
order: 10,
render: (container) => {
const btn = document.createElement('button');
btn.textContent = 'Refresh';
btn.onclick = () => console.log('clicked');
container.appendChild(btn);
return () => btn.remove();
},
});
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://toolboxjs.com/llms-full.txt