Skip to content
ArcadiaDesign
Move the pointer over the rows, or focus the list and use the arrows.

TSX

One highlight per list, gliding from row to row instead of each row lighting its own: it moves over 150ms on --ease-pop and appears or leaves with a 100ms fade where it stands, and the first light of a list lands in place. Render it as the list's first child. The list becomes its positioning box, and its rows stop drawing their own hover and highlight; a row's "you are here" fill stays.

It follows the row under the pointer while the pointer moved last, and otherwise the row with data-highlighted (a ListRow's highlighted, a menu's keyboard highlight), then the row with keyboard focus. Its fill is the row's --glide-fill (--glide-fill-kbd while the keyboard drives), so a keyboard highlight is a step stronger and a danger row tints it; its corner is the row's. Every Menu renders one, so pickers and action menus already glide.

Examples

In a tray

TrayBody takes glide for the pickers docked to a composer.

Add context

Choosing the row

target receives the list and its default highlighted row.

Return a row, null for none, or undefined to keep the default. Navigation can keep the default while interacting and return its current page at rest.

Use the morph duration and curve for navigation; menus keep the quick default.

--glide-duration
Ref<Duration>Default var(--duration-fast)
Travel duration (150ms by default).
--glide-ease
Ref<Easing>Default var(--ease-pop)
Travel curve (the popup curve by default).
--glide-rest-duration
Ref<Duration>Default var(--glide-duration)
Travel duration when the resting selection moves (a target's row, not the pointer's): the glide's own by default.
--glide-rest-ease
Ref<Easing>Default var(--glide-ease)
Travel curve when the resting selection moves: the glide's own by default.

The glide is decoration: an aria-hidden span with no role and no focus. The list states the highlight itself, through aria-activedescendant, aria-selected or focus, so assistive tech never depends on it.

Under reduced motion it jumps to the next row instead of gliding; the short fade stays. In forced colours it draws a Highlight outline, since system colours replace its fill.

↑ ↓
In the example, move the highlight; the glide follows

Glide

items
stringDefault ".ui-menu-item, .ui-row, .ui-tray-option"
The rows it lands on: a selector matched inside the list. Default: menu items, list rows and tray options.
target
(list: HTMLElement, fallback: HTMLElement | null) => HTMLElement | null | undefined
Picks the lit row where the default doesn't fit. Return a row, null for none, or undefined to fall back to the default: the row under the pointer when the pointer moved last, otherwise the row with data-highlighted, otherwise the row with keyboard focus. The second argument is that default row, so a navigation list can preserve it and supply its selection at rest.
rootStyle
RootStyle<GlideKnobs>
Typed StyleX override: layout and the movement knobs.