Skip to content

ToolbarContentDefinition

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

grid.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://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt