Defines the application header button data handled in SvelteApp._getHeaderButtons and associated getApplicationHeaderButtons hooks. SvelteApp extends the header button data from !ApplicationHeaderButton bringing an expanded feature set.

type HeaderButton = {
    alignLeft?: boolean;
    class?: string;
    icon?: string;
    keepMinimized?: boolean;
    keyCode?: string;
    label?: string;
    onContextMenu?: HeaderButtonCallback;
    onPress?: HeaderButtonCallback;
    styles?: { [key: string]: string };
    svelte?: Embed;
    tooltipDirection?: string;
}
Index

Properties

alignLeft?: boolean

When true, the button is left aligned after the window title.

false

class?: string

Additional CSS class to add to the header button.

icon?: string

Icon class identifier.

keepMinimized?: boolean

Keep the header button visible when the app is minimized.

keyCode?: string

Defines the KeyboardEvent 'code' that activates the button.

Enter

label?: string

Text label or language key to associate with button; used for tooltip.

onContextMenu?: HeaderButtonCallback

Callback when context menu activated. You may modify and return the button data to update it.

Callback when pressed. You may modify and return the button data to update it.

styles?: { [key: string]: string }

Hyphen case CSS property key / value object of properties to add as additional inline CSS styles to the button.

svelte?: Embed

You may load a custom Svelte component into the header to replace a button.

Note: supports just class, props definition.

tooltipDirection?: string

Tooltip direction; valid options include: UP, DOWN, LEFT, RIGHT, CENTER.

DOWN