Skip to content

Latest commit

 

History

History
74 lines (54 loc) · 5.07 KB

kibana-plugin-core-public.chromestart.md

File metadata and controls

74 lines (54 loc) · 5.07 KB

Home > kibana-plugin-core-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 

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);
});

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
getBreadcrumbsAppendExtension$() Get an observable of the current extension appended to breadcrumbs
getCustomNavLink$() Get an observable of the current custom nav link
getHelpExtension$() Get an observable of the current custom help conttent
getIsNavDrawerLocked$() Get an observable of the current locked state of the nav drawer.
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
setBreadcrumbsAppendExtension(breadcrumbsAppendExtension) Mount an element next to the last breadcrumb
setCustomNavLink(newCustomNavLink) Override the current set of custom nav link
setHeaderBanner(headerBanner) Set the banner that will appear on top of the chrome header.
setHelpExtension(helpExtension) Override the current set of custom help content
setHelpSupportUrl(url) Override the default support URL shown in the help menu
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.