Glide
One highlight per list that glides from row to row: menus, pickers, trays and a palette.
import { Glide } from "@arcadia/ui"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
Use the morph duration and curve for navigation; menus keep the quick default.
| Knob | Takes | Default | Sets |
|---|---|---|---|
Ref<Duration> | GLIDE | Travel duration (150ms by default). | |
Ref<Easing> | var(--ease-pop) | Travel curve (the popup curve by default). | |
Ref<Duration> | var(--glide-duration) | Travel duration when the resting selection moves (a target's row, not the pointer's): the glide's own by default. | |
Ref<Easing> | 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,
nullfor none, orundefinedto fall back to the default: the row under the pointer when the pointer moved last, otherwise the row withdata-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.