This example demonstrates the second approach which keeps the default layout plugin capabilities, but empties the sidebar.
To do it, we simply return an empty array in the `sidebarTabs`
property as following:
const defaultLayoutPluginInstance = defaultLayoutPlugin({
sidebarTabs: (defaultTabs) => [],
});
<Viewer fileUrl="..." plugins={[defaultLayoutPluginInstance]} />;
The `sidebarTabs`
property is a function which takes the array of default tabs and returns the tabs that you would like to show up in the sidebar. Returning an empty array (`[]`
) means that all default tabs are removed from the sidebar.
See also