Skip to content
Entangle UI v0.13.0

UseListboxNavOptions

Defined in: src/hooks/useListboxNav/useListboxNav.ts:9

T

optional defaultActiveIndex?: number

Defined in: src/hooks/useListboxNav/useListboxNav.ts:20

Initial active index. Defaults to -1 (no active item).


optional isItemDisabled?: (item, index) => boolean

Defined in: src/hooks/useListboxNav/useListboxNav.ts:17

Whether a given item should be skipped during navigation and rejected by selectActive().

T

number

boolean


items: T[]

Defined in: src/hooks/useListboxNav/useListboxNav.ts:11

Items rendered in the listbox. The hook tracks navigation by index.


optional loop?: boolean

Defined in: src/hooks/useListboxNav/useListboxNav.ts:26

Wrap from last → first (and vice versa) on next/prev.

true

optional onEscape?: () => void

Defined in: src/hooks/useListboxNav/useListboxNav.ts:39

Called on Escape.

void


optional onSelect?: (item, index) => void

Defined in: src/hooks/useListboxNav/useListboxNav.ts:36

Called when the active item is committed via selectActive().

T

number

void


optional resetOnItemsChange?: boolean

Defined in: src/hooks/useListboxNav/useListboxNav.ts:33

Reset the active index when the items array changes by reference. Useful for filtered listboxes where the previous index would be stale.

true