The configuration object to add a Svelte sidebar.

type FVTTSidebarAddData = {
    beforeId?: string;
    condition?: boolean | (() => boolean);
    icon: string | Embed;
    id: string;
    mergeAppImpl?: object;
    popoutApplication?: SvelteApp;
    popoutOptions?: object;
    popoutPostInitialize?: (app: SvelteApp) => void;
    sidebarClasses?: Iterable<string>;
    svelte: Embed;
    title?: string;
    tooltip?: string;
}
Index

Properties

beforeId?: string

The ID for the tab to place the new sidebar before. This must be an existing sidebar tab ID. THe stock Foundry sidebar tab IDs from left to right are:

condition?: boolean | (() => boolean)

A boolean value or function to invoke that returns a boolean value to control sidebar replacement. This is executed in the renderSidebar callback internally.

icon: string | Embed

The FontAwesome icon css classes or a Svelte configuration object to load a custom Svelte component to use as the "icon".

id: string

The unique Sidebar ID / name. Used for CSS ID and retrieving the sidebar.

mergeAppImpl?: object

Provides a custom base implementation for the object instance for this sidebar app stored in globalThis.ui.<SIDEBAR ID>.

popoutApplication?: SvelteApp

Provides a custom SvelteApp class to instantiate for the popout sidebar.

popoutOptions?: object

Provides SvelteApp options overrides for the default popout sidebar.

popoutPostInitialize?: (app: SvelteApp) => void

An optional function invoked after the popout app has been created.

sidebarClasses?: Iterable<string>

Additional CSS classes to add to the outer sidebar wrapper.

svelte: Embed

A Svelte configuration object.

title?: string

The popout application title text or i18n lang key.

tooltip?: string

The sidebar tab tooltip text or i18n lang key.