Nutrient Web SDK
    Preparing search index...

    Type Alias BaseSlot

    BaseSlot: SlotConfigurationCallback<BaseSlotParams> | BaseSlotUIOptions

    The base type for any slot configuration value.

    Every slot in UI.Configuration accepts one of two forms:

    • Function (full replacement): (instance, id) => { render, onMount?, onUnmount? } The SDK calls render(params) to obtain a DOM node. Return null to hide the slot.

    • Object (sub-slot customization): { header?, body?, footer? } Each region is an optional SlotConfigurationCallback. The default UI renders for any region you omit.

    Full replacement:

    ui: {
    search: (instance, id) => ({
    render: () => {
    const div = document.createElement("div");
    div.textContent = "Custom search";
    return div;
    },
    }),
    }

    Sub-slot customization:

    ui: {
    search: {
    header: (instance, id) => ({
    render: () => {
    const div = document.createElement("div");
    div.textContent = "Custom header above default search";
    return div;
    },
    }),
    // body and footer keep their defaults
    },
    }

    Hide a slot:

    ui: {
    search: (instance, id) => ({ render: () => null }),
    }