Skip to content

Commit 7d3a8b9

Browse files
000-528: hide buttons
1 parent 1376060 commit 7d3a8b9

File tree

1 file changed

+120
-0
lines changed

1 file changed

+120
-0
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
layout: page
3+
title: 'SharePoint list view: hide new button'
4+
menubar: docs_menu
5+
image: 'https://unsplash.com/s/photos/random'
6+
hero_image: '/img/IMG_20220521_140146.jpg'
7+
show_sidebar: false
8+
hero_height: is-small
9+
date: '2024-11-09'
10+
---
11+
12+
13+
This article will give you a few json formatting examples on how to hide buttons in the command bar of a SharePoint list view, such as "add new item", or "automate".
14+
15+
16+
# TL;DR;
17+
18+
You can hide one or more buttons in the command bar of your SharePoint list by using the following json. Pick only the keys you want to hide!
19+
20+
21+
{
22+
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
23+
"commandBarProps": {
24+
"commands": [
25+
{
26+
"key": "download",
27+
"hide": false
28+
},
29+
{
30+
"key": "share",
31+
"hide": true
32+
},
33+
{
34+
"key": "sync",
35+
"hide": false
36+
},
37+
{
38+
"key": "export",
39+
"hide": true
40+
},
41+
{
42+
"key": "automate",
43+
"hide": true
44+
},
45+
{
46+
"key": "integrate",
47+
"hide": true
48+
},
49+
{
50+
"key": "undo",
51+
"hide": true
52+
},
53+
{
54+
"key": "new",
55+
"hide": false
56+
},
57+
{
58+
"key": "editInGridView",
59+
"hide": true
60+
},
61+
{
62+
"key": "manageForms",
63+
"hide": true
64+
},
65+
{
66+
"key": "alertMe",
67+
"hide": true
68+
},
69+
{
70+
"key": "manageAlert",
71+
"hide": true
72+
},
73+
{
74+
"key": "edit",
75+
"hide": true
76+
},
77+
{
78+
"key": "copyLink",
79+
"hide": true
80+
},
81+
{
82+
"key": "comment",
83+
"hide": true
84+
},
85+
{
86+
"key": "delete",
87+
"hide": true
88+
},
89+
{
90+
"key": "versionHistory",
91+
"hide": true
92+
}
93+
]
94+
}
95+
}
96+
97+
98+
99+
# Intro
100+
101+
The command bar in SharePoint Online list view has several buttons:
102+
103+
104+
105+
And some extra ones that appear when you select an item:
106+
107+
108+
109+
110+
IMG
111+
112+
A list of command bar buttons with the corresponding key:
113+
114+
115+
# Hide a button in the command bar
116+
If you want to hide e.g. "add new item" button in the command bar of your SharePoint Online list, navigate to
117+
118+
119+
120+
Examples

0 commit comments

Comments
 (0)