Usage
Signature:
interface CToolbarElement
- Typescript Import Format
- //To typecheck the element APIs, import as below.
 import { CToolbarElement } from "oj-c/toolbar";
 //For the transpiled javascript to load the element's module, import as below
 import "oj-c/toolbar";
For additional information visit:
Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.
Attributes
- 
    
    chroming :"borderless"|"outlined"
- 
    
      Specifies the chroming to be set on content to be placed into the toolbar.NamesItem Name Property chromingProperty change event chromingChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-chroming-changed
- 
    
    items :Array.<(oj-c.Toolbar.ToolbarButton|oj-c.Toolbar.ToolbarMenuButton|oj-c.Toolbar.ToolbarSplitMenuButton|oj-c.Toolbar.ToolbarButtonsetSingle|oj-c.Toolbar.ToolbarButtonsetMultiple|oj-c.Toolbar.ToolbarToggleButton|oj-c.Toolbar.ToolbarProgressButton|oj-c.Toolbar.ToolbarSeparator)>
- 
    
      Specifies the content to be placed into the toolbar.- Default Value:
- []
 
 NamesItem Name Property itemsProperty change event itemsChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-items-changed
- 
    
    size :"sm"|"md"|"lg"
- 
    
      Specifies the size of content to be placed into the toolbar.NamesItem Name Property sizeProperty change event sizeChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-size-changed
- 
    
    spacing :"sm"|"lg"
- 
    
      Specifies the spacing between content. 'sm' spacing is recommended for button variants that don't have a background or border, for example borderless buttons. 'lg' spacing is recommended for button variants that have a background or border, for example outlined or solid buttons.Supported Values:Value Description lgDefault spacing between content. smCompact spacing between content. NamesItem Name Property spacingProperty change event spacingChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-spacing-changed
- 
    
    toolbar-selection :Readonly<Record<string, ToolbarSelection>>
- 
    
      An array containing key/value objects for selection groups.- Default Value:
- [object Object]
 
- Supports writeback:
- true
 
 NamesItem Name Property toolbarSelectionProperty change event toolbarSelectionChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-toolbar-selection-changed
Events
- 
        
    
    
      ojToolbarAction
- 
    
    
    Triggered when a toolbar item is clicked, whether by keyboard, mouse, or touch events. Detail indicates which toolbar item was clicked.Properties:All of the event payloads listed below can be found under event.detail. See Events and Listeners for additional information.Name Type keystring 
- 
        
    
    
      ojToolbarSelection
- 
    
    
    Triggered when a toolbar selection group item is clicked, whether by keyboard, mouse, or touch events. Detail indicates new selection value for group.Properties:All of the event payloads listed below can be found under event.detail. See Events and Listeners for additional information.Name Type toolbarSelectionGroupKeystring valueT 
Methods
- 
        
    
    
      getProperty(property) : {any}
- 
    
    
    Retrieves the value of a property or a subproperty.Parameters:Name Type Description propertyThe property name to get. Supports dot notation for subproperty access. Returns:- Type
- any
 
- 
        
    
    
      setProperties(properties) : {void}
- 
    
    
    Performs a batch set of properties.Parameters:Name Type Description propertiesAn object containing the property and value pairs to set. Returns:- Type
- void
 
- 
        
    
    
      setProperty(property, value) : {void}
- 
    
    
    Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a corresponding event.Parameters:Name Type Description propertyThe property name to set. Supports dot notation for subproperty access. valueThe new value to set the property to. Returns:- Type
- void
 
Type Definitions
- 
    
    MenuItem
- 
    
      Specifies a standard menu item.Properties:Name Type Argument Description disabledboolean <optional> 
 Specifies if the menu item is disabled (enabled by default). endIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the end of the menu item. keystring A unique key associated with the menu item. labelstring The menu item label. onActionfunction <optional> 
 Optional callback function associated with the menu item. startIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the start of the menu item. type"item" <optional> 
 Specifies a standard menu item. variant"standard" | "destructive" <optional> 
 Specifies the menu item behavior. 
- 
    
    MenuSelectItem
- 
    
      Specifies a selectable item in a menu item.Properties:Name Type Argument Description disabledboolean <optional> 
 Specifies if the selectable item is disabled (enabled by default). endIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the end of the selectable item. labelstring The selectable item label. valuestring The value associated with the selectable item. 
- 
    
    MenuSelectMultiple
- 
    
      Specifies a menu item representing a select multiple.Properties:Name Type Argument Description itemsArray.<oj-c.Toolbar.MenuSelectItem> <optional> 
 Specifies the array of select items that make up the select multiple. keystring A unique key associated with the select multiple. type"selectmultiple" Specifies a select multiple menu item. 
- 
    
    MenuSelectSingle
- 
    
      Specifies a menu item representing a select single.Properties:Name Type Argument Description itemsArray.<oj-c.Toolbar.MenuSelectItem> <optional> 
 Specifies the array of select items that make up the select single. keystring A unique key associated with the select single. type"selectsingle" Specifies a select single menu item. 
- 
    
    MenuSeparator
- 
    
      Specifies a menu separator:{ type: "separator" }.- Deprecated:
-  
Since Value Description 17.0.0divider Use 'separator' instead. 
 Properties:Name Type Description typeseparator | divider Specifies a separator menu item. 
- 
    
    MenuSubMenu
- 
    
      Specifies a menu item representing a submenu.Properties:Name Type Argument Description disabledboolean <optional> 
 Specifies if the submenu is disabled (enabled by default). itemsArray<oj-c.Toolbar.MenuSeparator | oj-c.Toolbar.MenuItem | oj-c.Toolbar.MenuSubMenu | oj-c.Toolbar.MenuSelectSingle | oj-c.Toolbar.MenuSelectMultiple> <optional> 
 Specifies the array of menu items that make up the submenu. keystring <optional> 
 A unique key associated with the submenu menu item. labelstring <optional> 
 The submenu label. startIconstring <optional> 
 Optional icon to render at the start of the submenu. type"submenu" Specifies a submenu menu item. 
- 
    
    ToggleItem
- 
    
    
    
     
  Properties:Name Type Argument Description disabledboolean <optional> 
 Specifies if the toggle item is disabled (enabled by default). endIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the end of the toggle item. labelstring The toggle item label. startIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the start of the toggle item. valuestring The toggle item value. 
- 
    
    ToolbarButton
- 
    
      Describes an oj-c-button item in the Toolbar.Properties:Name Type Argument Description chroming"solid" | "ghost" | "borderless" | "outlined" | "callToAction" | "danger" <optional> 
 Indicates in what states the button has variants in background and border. disabledboolean <optional> 
 Specifies that the button element should be disabled. display"all" | "label" | "icons" <optional> 
 Display just the label, the icons, or all. Label is used as tooltip and should be set in all cases. endIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the end of the button. keystring A unique key associated with the toolbar item. labelstring Text to show in the button. onActionfunction <optional> 
 Optional callback function associated with the toolbar item. startIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the start of the button. tooltipstring <optional> 
 Text to show in the tooltip. This overrides the default tooltip that renders the label when in icon mode. type"button" Specifies the desired toolbar item. 
- 
    
    ToolbarButtonsetMultiple
- 
    
      Describes an oj-c-buttonset-multiple item in the Toolbar.Properties:Name Type Argument Description chroming"borderless" | "outlined" <optional> 
 Indicates in what states the button has chromings in background and border. disabledboolean <optional> 
 Specifies that the buttonset should be disabled. display"all" | "label" | "icons" <optional> 
 Display just the label, the icons, or all. itemsArray.<oj-c.Toolbar.ToggleItem> <optional> 
 Specifies the toggle buttons rendered by the buttonset. keystring A unique key associated with the toolbar item. type"buttonset-multiple" Specifies the desired toolbar item. 
- 
    
    ToolbarButtonsetSingle
- 
    
      Describes an oj-c-buttonset-single item in the Toolbar.Properties:Name Type Argument Description chroming"borderless" | "outlined" <optional> 
 Indicates in what states the button has chromings in background and border. disabledboolean <optional> 
 Specifies that the buttonset should be disabled. display"all" | "label" | "icons" <optional> 
 Display just the label, the icons, or all. itemsArray.<oj-c.Toolbar.ToggleItem> <optional> 
 Specifies the toggle buttons rendered by the buttonset. keystring A unique key associated with the toolbar item. type"buttonset-single" Specifies the desired toolbar item. 
- 
    
    ToolbarMenuButton
- 
    
      Describes an oj-c-menu-button item in the Toolbar.Properties:Name Type Argument Description chroming"solid" | "ghost" | "borderless" | "outlined" <optional> 
 Indicates in what states the button has chromings in background and border. disabledboolean <optional> 
 Specifies that the button element should be disabled. display"all" | "label" | "icons" <optional> 
 Display just the label, the icons, or all. Label is used as tooltip and should be set in all cases. endIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the end of the button. itemsArray<oj-c.Toolbar.MenuSeparator | oj-c.Toolbar.MenuItem | oj-c.Toolbar.MenuSubMenu | oj-c.Toolbar.MenuSelectSingle | oj-c.Toolbar.MenuSelectMultiple> <optional> 
 Items describe the menu items rendered by the menu button. keystring <optional> 
 A unique key associated with the toolbar item, only needed for automated testing. labelstring Text to show in the button. startIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the start of the button. suffixstring <optional> 
 Suffix appended to menu label to indicate last selection. tooltipstring <optional> 
 Text to show in the tooltip. This overrides the default tooltip that renders the label when in icon mode. type"menu-button" Specifies the desired toolbar item. 
- 
    
    ToolbarProgressButton
- 
    
      Describes an oj-c-progress-button item in the Toolbar.Properties:Name Type Argument Description chroming"solid" | "borderless" | "outlined" | "callToAction" <optional> 
 Indicates in what states the button has variants in background and border. disabledboolean <optional> 
 Specifies that the button element should be disabled. display"all" | "label" | "icons" <optional> 
 Display just the label, the icons, or all. Label is used as tooltip and should be set in all cases. endIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the end of the button. isLoadingboolean <optional> 
 Specifies if progress should be shown. keystring A unique key associated with the toolbar item. labelstring Text to show in the button or as tooltip for icon mode. onActionfunction <optional> 
 Optional callback function associated with the toolbar item. startIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the start of the button. tooltipstring <optional> 
 Text to show in the tooltip. This overrides the default tooltip that renders the label when in icon mode. type"progress-button" Specifies the desired toolbar item. 
- 
    
    ToolbarSeparator
- 
    
      Describes a separator item in the Toolbar.Properties:Name Type Description type"separator" Specifies the desired toolbar item. 
- 
    
    ToolbarSplitMenuButton
- 
    
      Describes an oj-c-split-menu-button item in the Toolbar.Properties:Name Type Argument Description chroming"solid" | "outlined" | "callToAction" <optional> 
 Indicates in what states the button has chromings in background and border. disabledboolean <optional> 
 Specifies that the button element should be disabled. itemsArray<oj-c.Toolbar.MenuSeparator | oj-c.Toolbar.MenuItem> <optional> 
 Items describe the menu items rendered by the menu button. keystring A unique key associated with the toolbar item. labelstring Text to show in the button. onActionfunction <optional> 
 Optional callback function associated with the toolbar item. tooltipstring <optional> 
 Text to show in the tooltip. type"split-menu-button" Specifies the desired toolbar item. 
- 
    
    ToolbarToggleButton
- 
    
      Describes an oj-c-toggle-button item in the Toolbar.Properties:Name Type Argument Description chroming"borderless" | "outlined" <optional> 
 Indicates in what states the button has variants in background and border. disabledboolean <optional> 
 Specifies that the button element should be disabled. display"all" | "label" | "icons" <optional> 
 Display just the label, the icons, or all. Label is used as tooltip and should be set in all cases. endIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the end of the button. keystring A unique key associated with the toolbar item. labelstring Text to show in the button. startIcon{ type?: 'class'; class: string; } | { type: 'img'; src: string; } <optional> 
 Optional icon to render at the start of the button. tooltipstring <optional> 
 Text to show in the tooltip. This overrides the default tooltip that renders the label when in icon mode. type"toggle-button" Specifies the desired toolbar item.