API
API
The browser module exports createMovingHighlight. The React package adds MovingHighlight.
| Name | Description |
|---|---|
createMovingHighlight(root, options?) | Adds one background that moves between the rows inside root. Returns refresh and destroy. |
mode | "hover" follows the pointer and focus and rests on the selected row. "selected" stays on the selected row and moves only when the selection changes. "hover" by default. |
rowSelector, selectedSelector | Which elements are rows, [data-reuse-row] by default, and which one is selected: data-current, aria-selected or data-highlighted. |
className | Added to the background element. Use it to tell two highlights on one root apart. |
MovingHighlight | The React wrapper around the same controller. highlightClassName sets the background's class. |