Remove a tab from the sidebar

This example demonstrates how we can remove a tab from the sidebar which is created by the Default Layout plugin.
For example, we will remove the Attachments tab.
const defaultLayoutPluginInstance = defaultLayoutPlugin({
sidebarTabs: (defaultTabs) => [
// Remove the attachments tab (\`defaultTabs[2]\`)
defaultTabs[0], // Bookmarks tab
defaultTabs[1], // Thumbnails tab
],
});
// Render
<Viewer fileUrl="..." plugins={[defaultLayoutPluginInstance]} />;

See also