HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


## Add a component

The following example shows how to add a component (for a view through configuration) to the Mainarea plug-in path of the **Test** view. `definitionName` usually maps against the full name of the class including namespace.



## Remove a component

The following example shows how to remove one of the built-in components - the Media Component.



This kind of declarative way requires you to write a few magic strings. 

An alternative solution can be achieved by adding a new initializable module like this:



Both examples will remove the component for all users; however, it is sometimes needed to show or hide certain components based on user access rights.

Transformations will not work in this case as they do not allow the user to specify conditions for modifying the component or not.

However, it would be easy to modify the above C# sample to only add a view transformation when a certain condition is met:



All built-in public components are defined in `EPiServer.Cms.Shell.UI.Components` namespace.