Home > @findkit/ui > init

init() function

Signature:

export declare function init(_options: {
    publicToken: string;
    instanceId: string;
    shadowDom?: boolean;
    cssLayers?: boolean;
    minTerms?: number;
    layeredCSS: LayeredCSS[];
    slots?: Partial<Slots>;
    events: Emitter<FindkitUIEvents, unknown>;
    searchEndpoint?: string;
    params?: SearchParams;
    forceHistoryReplace?: boolean;
    closeOnOutsideClick?: boolean;
    groups?: GroupDefinition[];
    fetchCount?: number;
    container?: Element;
    lockScroll?: boolean;
    builtinStyles?: boolean;
    infiniteScroll?: boolean;
    backdrop?: boolean;
    inert?: string | boolean;
    modal?: boolean;
    header?: boolean;
    router?: SearchEngineOptions["router"];
    groupOrder?: GroupOrder;
    fontDivisor?: number;
}): {
    engine: SearchEngine;
    host: Element;
};

Parameters

Parameter Type Description
_options { publicToken: string; instanceId: string; shadowDom?: boolean; cssLayers?: boolean; minTerms?: number; layeredCSS: LayeredCSS[]; slots?: Partial<Slots>; events: Emitter<FindkitUIEvents, unknown>; searchEndpoint?: string; params?: SearchParams; forceHistoryReplace?: boolean; closeOnOutsideClick?: boolean; groups?: GroupDefinition[]; fetchCount?: number; container?: Element; lockScroll?: boolean; builtinStyles?: boolean; infiniteScroll?: boolean; backdrop?: boolean; inert?: string | boolean; modal?: boolean; header?: boolean; router?: SearchEngineOptions["router"]; groupOrder?: GroupOrder; fontDivisor?: number; }

Returns:

{ engine: SearchEngine; host: Element; }