toolbar
Description
Configures the built-in toolbar
toolbar: boolean | UIToolbarItemDef[] | UIToolbarConfig
Example
gantt.plugins({ toolbar: true, undo: true });
gantt.config.toolbar = {
items: ["add_task", "|", "undo", "redo", "spacer", "theme"],
css: "project-toolbar",
collapseWidth: 480
};
gantt.init("gantt_here");
Details
Enable the toolbar plugin to use this setting.
- Omit the setting or set it to
trueto use the default items. - Pass an array of item definitions or an object with an
itemsarray to choose the displayed items. - Use
cssin the object form to add a class to the toolbar element. - Use
overflowto choose how the toolbar handles a narrow width:"menu"(default) keeps one row and moves items that do not fit into a "More" menu,"collapse"puts all non-pinned items in one burger menu, and"wrap"lets items wrap onto more lines. Items acceptoverflowtoo ("auto","never"or"always"). See Narrow screens. - Use
collapseWidthto set a width in CSS px. Withoverflow: "menu", the toolbar collapses into one menu when it is narrower than this value. The width is the toolbar's own width, not the viewport width. - Set
toolbartofalseto skip the default toolbar row. An explicit toolbar layout cell still determines its own place in the layout.
See the Toolbar guide for the built-in items, item definitions and runtime API.
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.