Limit the display of a command set to a specific list instance

Occasional Contributor


According to this Microsoft article on how to create command set extension, one can publish a command to one or more generic type of lists / document libraries by setting them in the file elements,xml.

For instance, making all custom lists display the command set:





However, I want a command set to appear in only one specific list instance rather than in all custom lists / document libraries.


Do you know, how can this be done?


Thank you




4 Replies
best response confirmed by Filipe Matos (Occasional Contributor)
Yes, you can apply list view command set to a specific list/library.
Please refer this link which will be helpful -

I hope this helps.

Hi @Swaminathan Sriram,

Sorry for the late feedback. Your answer did help.

Thank you


Hi @Filipe Matos - I think hardcoding the listname is not a great solution. Have a look here :- where the dev uses the site property bag to enumerate the lists guids which will have the functionality.

Would be good if SpFx natively had more scoping options.

Hi @SeanyC67

Thank you for pointing this out, I will have a look at it.