Interface Menu
focusEl?: string | HTMLElement;
items?: Iterable<Items> | () => Iterable<Items>;
keyCode?: string;
offset?: { x?: number; y?: number };
slotAfter?: Embed;
slotBefore?: Embed;
slotDefault?: Embed;
styles?: { [key: string]: string };
transitionOptions?: { duration: number; easing: EasingReference };
}
Index
Properties
Optional
focusEl
A specific HTMLElement or selector string as the explicit focus target. Note: that the menu components will
automatically resume focus with the originating component / element by default. Only provide focusEl
to
explicitly focus a given target.
Optional
items
The data driven menu item list or a function that returns a menu item list.
Optional
keyCode
The key code to activate menu items.
Optional
offset
Optional X / Y offsets for the menu display.
Optional
slotAfter
A minimal Svelte config defining a menu item component after the main data driven menu items.
Optional
slotBefore
A minimal Svelte config defining a menu item component before the main data driven menu items.
Optional
slotDefault
A minimal Svelte config defining the default content component replacing the data driven menu items.
Optional
styles
Styles to be applied inline.
Optional
transitionOptions
Custom transition options for duration and easing function reference. The default easing function is
quintOut
.
Defines the data configuration object for context and popover menus.