Toolbar
The Toolbar category in the @itwin/components-react
package includes
components that provide a toolbar that supports an overflow button.
Component | Description |
---|---|
ToolbarWithOverflow | Toolbar that can be oriented horizontal or vertical. |
PopupItem | Toolbar button that display a popup panel |
ToolbarWithOverflow
ToolbarWithOverflow is a toolbar component that can be oriented horizontal or vertical. It will automatically show an overflow button if the all buttons cannot be displayed due to the size of the toolbar.
ToolbarWithOverflow Sample
The following sample shows the definition of a toolbar.
The props defined above are all defaults, so the above definition could be shortened to the following.
Toolbar Popup Buttons
Toolbar support two basic Popup buttons, one that is created for a GroupButton definition that show a panel of tools to execute and one that shows custom contents in a popup panel using CustomToolbarItem definition.
Custom Popup Panel
A CustomToolbarItem definition can be used to define a button with a custom pop-up panel. The panelContentNode
property is used to define the React component to display in the popup panel.
Group Popup Panel
Below is an example of setting up a GroupButton definition that shows a pop-up panel of actions.
API Reference
Last Updated: 02 February, 2022