ToolPanelDefinition
Tool panel definition registered by plugins or consumers.
Register via grid.registerToolPanel() to add panels to the sidebar.
Panels appear as collapsible sections with icons and titles.
Example
Section titled “Example”grid.registerToolPanel({ id: 'filters', title: 'Filters', icon: '🔍', tooltip: 'Filter grid data', order: 10, // Lower = appears first render: (container) => { container.innerHTML = ` <div class="filter-panel"> <input type="text" placeholder="Search..." /> </div> `; // Return cleanup function return () => container.innerHTML = ''; }, onClose: () => { console.log('Filter panel closed'); },});Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
id | string | Unique panel ID |
title | string | Panel title shown in accordion header |
icon? | string | Icon for accordion section header (optional, emoji or SVG) |
tooltip? | string | Tooltip for accordion section header |
render | (container: HTMLElement) => void | () => void | Panel content factory - called when panel section opens |
onClose? | () => void | Called when panel closes (for cleanup) |
order? | number | Panel order priority (lower = first, default: 100) |
See Also
Section titled “See Also”ShellConfigfor shell configuration
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