Skip to content
API reference

lib/glide

Kind Export Description
function useGlide() One highlight that glides between a list’s rows instead of blinking from row to row. lit selects the highlighted row (keyboard or pointer). While the highlight moves, a single stand-in carrying that row’s own resting background and radius travels from the previous row and the rows’ own highlights are held back, so at rest every row looks exactly as it always has. Within one open list the glide remembers its last row, so leaving and re-entering glides from where it was. Timing and easing are the theme’s; reduced motion moves the highlight at once.
Signature
function useGlide(lit): RefCallback<HTMLElement>;

One highlight that glides between a list’s rows instead of blinking from row to row. lit selects the highlighted row (keyboard or pointer). While the highlight moves, a single stand-in carrying that row’s own resting background and radius travels from the previous row and the rows’ own highlights are held back, so at rest every row looks exactly as it always has. Within one open list the glide remembers its last row, so leaving and re-entering glides from where it was. Timing and easing are the theme’s; reduced motion moves the highlight at once.

Parameter Type
lit string

RefCallback<HTMLElement>