text-brush-shimmer-sweep
Installation
SKILL.md
A highlight that travels through the glyphs
TextStyle takes a Brush. Animate the gradient's startX/endX and the text shimmers — not a
rectangle over it, not a masked copy of it. Nothing has to measure the label, so it keeps working
at any width, in any language, wrapped or not.
// adapted — the transition is declared OUTSIDE the gate that shows the label
val sweep = rememberInfiniteTransition(label = "sweep")
val head by sweep.animateFloat(
initialValue = 0f, targetValue = 1f,
animationSpec = infiniteRepeatable(tween(3200, easing = LinearEasing), RepeatMode.Restart),
label = "sweepHead",
)