Sharepoint Online : Hide command bar button

Hello,
is there any way to hidden one or more button in this bar?

Thank you.

Dear @stefano.mazzi,
Only with CSS, which applies to the List View:
image

You can check what classes to use in order to hide buttons with browser's inspector:

2 Likes

Hey, what else can you hide in "list view"? Is there any documentation discussing this in detail?

Dear @DryChips,
You can hide any part of the List View, but you need to use browser's inspector to check HTML classes, if you want to target some specific part.

If you have a specific request, I can showcase a specific example, but it would be impossible to describe every single option.

I can't hide Integrate button
image
Could you help me?
Thank you.

@Nikita_Kurguzov
Is it correct use this code:

/* HIDE Integrate button */
.ms-CommandBarItem-link[name="Integrate"] {
    display: none;
}

In this case works only if the language is englich, if the site is in italian the button appear.
Let me know please.
Thank you.

Dear @stefano.mazzi,
Check if the name is different in Italian, and include both variants in CSS.

Unfortunately yes, they are different, but I can't pass from translation label.
There is a way to hide this button as the others? Using a fix parameter?

Dear @stefano.mazzi,
What do you mean by

I can't pass from translation label

Why not?

Hello @Nikita_Kurguzov
I can't use translation to hide the button because we have different branches in the world and everyone use browser in their language, I should translate it in all languages :frowning:
Why this button doesn't has a data-automationid as the others?
Does it possibile Microsoft forgot to assign one in the code?
Thank you.

Dear @stefano.mazzi,
Yes, that's up to Microsoft what they give to the buttons. You can try to rely on button's position with n-th child selector, but it's also not the most reliable and will need to be fixed if button position changes.

So, either use all possible translations (which is a lot of work, but doable), or use something to target the specific button position, for example - CSS :nth-child() Selector