Skip to content

API

INavigableListProps

Property NameTypeDefaultDescription
classNamestring-Class name for the list container.
listItemStylesobject-Styling/classes of the items/rows depending on their state (selected, disabled, focused).
itemsobject[][]List of items/rows to be fed to the component. Each item should have a label and value field.
selectednumber[][]List of selected indexes.
disablednumber[][]List of disabled indexes.
maxSelectionnumberundefinedLimit the maximum selected items when multiple selection is enabled.
focusedIndexnumber0Default focused/hovered index.
shouldFocusComponentbooleanIndicates whether the component should capture focus for keyboard interactions.false
multiplebooleanfalseEnable multi-select or not.
checkboxOnMultiplebooleanfalseEnable checkboxes for multi-select.
keyboardEventsbooleanfalseEnable keyboard navigation/interactions.
enableDragToScrollbooleantrueEnable scrolling by dragging rows/items with the mouse.
overflowYbooleanfalseEnable overflow if you want a scrollable list, else a normal list without scrolling.
onMouseLeaveResetFocusedIndexbooleanfalseReset focused index to undefined on mouse leave.
onChangefunction-Callback function triggered when selected indexes change.
onScrollfunction-Callback function to keep track of the scroll position.
onKeyboardNavigation`(currentIndex: number, keyPressed: “ArrowUp” | “ArrowDown”) => booleanundefined`Callback triggered during keyboard navigation. If it returns true, the default navigation behavior is prevented.
enableVirtualizationbooleanfalseEnable virtualization for better performance with large lists.
itemHeightnumber20Height of each item row (required if virtualization is enabled).
windowHeightnumber300Height of the list window (required if virtualization is enabled).
overscannumber20Number of extra items to render before and after the visible area/range when virtualization is enabled.