Skip to content

Latest commit

 

History

History
69 lines (49 loc) · 4.2 KB

kibana-plugin-public.chromestart.md

File metadata and controls

69 lines (49 loc) · 4.2 KB

Home > kibana-plugin-public > ChromeStart

ChromeStart interface

ChromeStart allows plugins to customize the global chrome header UI and enrich the UX with additional information about the current location of the browser.

Signature:

export interface ChromeStart 

Properties

Property Type Description
docTitle ChromeDocTitle APIs for accessing and updating the document title.
navControls ChromeNavControls APIs for registering new controls to be displayed in the navigation bar.
navLinks ChromeNavLinks APIs for manipulating nav links.
recentlyAccessed ChromeRecentlyAccessed APIs for recently accessed history.

Methods

Method Description
addApplicationClass(className) Add a className that should be set on the application container.
getApplicationClasses$() Get the current set of classNames that will be set on the application container.
getBadge$() Get an observable of the current badge
getBrand$() Get an observable of the current brand information.
getBreadcrumbs$() Get an observable of the current list of breadcrumbs
getHelpExtension$() Get an observable of the current custom help conttent
getIsCollapsed$() Get an observable of the current collapsed state of the chrome.
getIsVisible$() Get an observable of the current visibility state of the chrome.
removeApplicationClass(className) Remove a className added with addApplicationClass(). If className is unknown it is ignored.
setAppTitle(appTitle) Sets the current app's title
setBadge(badge) Override the current badge
setBrand(brand) Set the brand configuration.
setBreadcrumbs(newBreadcrumbs) Override the current set of breadcrumbs
setHelpExtension(helpExtension) Override the current set of custom help content
setIsCollapsed(isCollapsed) Set the collapsed state of the chrome navigation.
setIsVisible(isVisible) Set the temporary visibility for the chrome. This does nothing if the chrome is hidden by default and should be used to hide the chrome for things like full-screen modes with an exit button.

Remarks

While ChromeStart exposes many APIs, they should be used sparingly and the developer should understand how they affect other plugins and applications.

Example 1

How to add a recently accessed item to the sidebar:

core.chrome.recentlyAccessed.add('/app/map/1234', 'Map 1234', '1234');

Example 2

How to set the help dropdown extension:

core.chrome.setHelpExtension(elem => {
  ReactDOM.render(<MyHelpComponent />, elem);
  return () => ReactDOM.unmountComponentAtNode(elem);
});