Hide commands from a SharePoint list or library toolbar
How to hide specific commands from a SharePoint list or library toolbar.
The SharePoint document library (or list) toolbar can be customized. We can hide, rename, change icons, and rearrange the commands.
💡
This approach applies to the specific View in your list or library. If you have multiple views, you'll need to apply this custom formatting to each one.
How to apply the customizations?
- Select your list or library view, and then choose
Format Current View
. - Switch to advanced mode. Replace the default JSON with your own using the example below. Find all the commands here.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{
"key": "editInGridView",
"hide": true
},
{
"key": "pinToQuickAccess",
"hide": true
},
{
"key": "export",
"hide": true
},
{
"key": "pinItem",
"hide": true
},
{
"key": "automate",
"hide": true
},
{
"key": "checkOut",
"hide": true
},
{
"key": "properties",
"hide": true
},
{
"key": "sync",
"hide": true
},
{
"key": "download",
"hide": true
},
{
"key": "addShortcut",
"hide": true
},
{
"key": "integrate",
"hide": true
}
]
}
}
Limitations
- This approach only manipulates the command bar in the current view. You need to apply the same logic to every view independently, allowing different commands to appear depending on the view.
- This approach doesn’t replace permissions. If you don’t want users uploading documents, give them Read Only access to the library, not just conceal the Upload button.
- Some commands appear when one or more documents are selected. Your JSON can specify if the command should be affected based on the selection mode. Read more here.
- Some commands, like Submit for Approval, cannot be hidden.
- You’re hiding these commands. If specific users need to make changes using the toolbar, they need to remove this formatting to access the commands.
Reference
Updated on Jul 27, 2025