Motion
useHoverIndicator
The sliding hover and keyboard highlight behind vael-ui’s lists. Use it to give your own lists the same highlight.
The sliding hover highlight behind every vael-ui list: Select, Menu, Tree, DataTable, Tabs, Pagination, Calendar and the rest. It slides one indicator element to the row under a mouse or pen, or to the row with keyboard focus, which always wins. Touch is ignored, as hover styles are. Use it to give your own list the same feel: mark the rows with itemSelector, put an element with the ui-indicator class inside the list, and bind the style it returns. The list needs position: relative; isolation: isolate, so the indicator sits behind the rows. Style it with --ui-indicator-bg, --ui-duration-indicator and --ui-ease-indicator, or set motion: false and drive it yourself.
Install
import { useHoverIndicator } from 'vael-ui'