useIndicator

The sliding indicator of a segmented control or tab list, as two AppBlob shapes. Items carry data-indicator="<key>"; the active one is measured against the container with a ResizeObserver, in physical px, so RTL needs nothing. The head moves first and the tail follows, so the pill stretches from the old item to the new one and settles. With quick set (hover), both move on a short tween; under reduced motion both jump. Keyboard and ARIA stay on your radios or tabs.

Install: pnpm add-composable useIndicator

Segmented control

API