Add a button to Command Bar of a SharePoint online Library All Item view

Copper Contributor

I have a requirement to add a new button to the Command Bar (Just above the Lst View with New, Upload, Sync, Share,... buttons). using Custom Actions. 

 

I couldn't find a way to add a custom action to the Command Bar / Hero bar. 

 

Appreciate your support on thisCapture1.PNG

5 Replies

AFAIK, this is currently not possible.

Agree, I'm not aware of way of extending that bar...you can extend the ribbon, the ECB...but not sure about that bar...maybe by injecting some JS?

Yep I can inject some JS, but thought of checking first if there's a way to add a button to the command bar similar to Ribbon and ECB. 

 

Thanks guys for the responses. 

I've done this before, like Juan mentioned, just by injecting JS, its the only way.
Can you please give me a example for injecting JavaScript to add CommandBar button?