Nutrient Web SDK
    Preparing search index...

    Type Alias SidebarUI

    SidebarUI: { container?: BaseSlot } & Record<
        string,
        SlotConfigurationCallback<BaseSlotParams>,
    >

    Use this to add custom sidebars and customize the sidebar container.

    Type Declaration

    • Optionalcontainer?: BaseSlot

      Customize or hide the sidebar container (thumbnails, outline, annotations, bookmarks, etc.). Return null from render to hide the entire sidebar.

    Adding a custom sidebar myCustomSidebar:

    NutrientViewer.load({
    // ... Your configuration.
    ui: {
    sidebar: {
    myCustomSidebar: (getInstance, id) => ({
    render: (params) => {
    const div = document.createElement("div");
    div.innerText = "This is my custom sidebar!";
    div.style.padding = "10px";
    div.style.color = "#ccc";
    return div;
    },
    }),
    },
    },
    });