Vizel API / core/src / buildVizelMentionMenuSpec
Function: buildVizelMentionMenuSpec()
ts
function buildVizelMentionMenuSpec(
items,
selectedIndex,
locale): VizelMenuSpec<VizelMentionItemView>;Defined in: packages/core/src/builders/mention-menu.ts:31
Build a VizelMenuSpec for the mention autocomplete menu.
Mention menus are flat (no groups), use role="listbox", and address the active option through aria-activedescendant. The locale provides the container's aria-label; framework components render the item view (avatar + label + description) themselves using the supplied data field.
Returning an empty sections array signals the empty / no-results state — the component renders a localized empty-state element.
Parameters
| Parameter | Type |
|---|---|
items | readonly VizelMentionItem[] |
selectedIndex | number |
locale | VizelLocale | undefined |