# Adding a button to top-navbar through plugin in kibana 6.2.1

**URL:** <https://discuss.elastic.co/t/adding-a-button-to-top-navbar-through-plugin-in-kibana-6-2-1/121559>\
**Category:** Kibana\
**Created:** [February 26, 2018, 8:12pm UTC](https://discuss.elastic.co/t/adding-a-button-to-top-navbar-through-plugin-in-kibana-6-2-1/121559 "2018-02-26T20:12:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sunny\_Sachan](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@Sunny\_Sachan](https://discuss.elastic.co/u/Sunny_Sachan)\
**Post date:** [February 26, 2018, 8:12pm UTC](https://discuss.elastic.co/t/adding-a-button-to-top-navbar-through-plugin-in-kibana-6-2-1/121559/1 "2018-02-26T20:12:41Z")

</div>

Hi all,

I want to add a button to the top nav bar where fullscreen, share etc button exist in kibana 6.2.1, I am using plugin-generator version 7.0.1 and want that button to be displayed when dashboard tab is selected please anybody do help me.

I am using os windows 10

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [February 27, 2018, 6:15pm UTC](https://discuss.elastic.co/t/adding-a-button-to-top-navbar-through-plugin-in-kibana-6-2-1/121559/2 "2018-02-27T18:15:30Z")

</div>

Hey @Sunny_Sachan, you can use the `NavBarExtensionsRegistryProvider` to register your own button, the following is an example:

```auto
import { XPackInfoProvider } from 'plugins/xpack_main/services/xpack_info';
import { NavBarExtensionsRegistryProvider } from 'ui/registry/navbar_extensions';

function navbarButtonProvider(Private, $location, dashboardConfig) {
  return {
    appName: '',
    key: '',
    label: '',
    template: `<angular-directive></angular-directive>`,
    description: '',
    hideButton: () => true,
    disableButton: () => true,
    tooltip: () => '',
  };
}

NavBarExtensionsRegistryProvider.register(navbarButtonProvider);

```

---

<div class="post-metadata">

**Author:** ![Sunny\_Sachan](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@Sunny\_Sachan](https://discuss.elastic.co/u/Sunny_Sachan)\
**Post date:** [February 27, 2018, 6:19pm UTC](https://discuss.elastic.co/t/adding-a-button-to-top-navbar-through-plugin-in-kibana-6-2-1/121559/3 "2018-02-27T18:19:06Z")

</div>

Many many thanks Brandon for your help here I'll surely try the same and will let you know.

---

<div class="post-metadata">

**Author:** ![Sunny\_Sachan](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@Sunny\_Sachan](https://discuss.elastic.co/u/Sunny_Sachan)\
**Post date:** [February 27, 2018, 6:56pm UTC](https://discuss.elastic.co/t/adding-a-button-to-top-navbar-through-plugin-in-kibana-6-2-1/121559/4 "2018-02-27T18:56:20Z")

</div>

Hi Brandon,

Many thanks your solution worked well.!

It will be a lot more of your help if you could also help me knowing how to completely hide some of the left panel tabs like management, timelion and devtools from my plugin, if there is any provider for doing the same, please do let me know.

Many thanks in advance.

---

<div class="post-metadata">

**Author:** ![Sunny\_Sachan](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@Sunny\_Sachan](https://discuss.elastic.co/u/Sunny_Sachan)\
**Post date:** [March 1, 2018, 6:32pm UTC](https://discuss.elastic.co/t/adding-a-button-to-top-navbar-through-plugin-in-kibana-6-2-1/121559/5 "2018-03-01T18:32:34Z")

</div>

Hi Brandon,

Can I also hide some of the existing navbar buttons like share, Clone and Edit buttons through the above "NavBarExtensionsRegistryProvider", if yes can you please help how to do the same, else it would be a lot more of your help if you could tell me how to achieve the same.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 29, 2018, 6:33pm UTC](https://discuss.elastic.co/t/adding-a-button-to-top-navbar-through-plugin-in-kibana-6-2-1/121559/6 "2018-03-29T18:33:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
