Shimmer
April 28, 2026 · View on GitHub
Skeleton-style loading shimmer: text with a highlight band sweeping continuously left-to-right. Characters inside the band blend toward an accent colour; characters outside use the base style. Multi-line text is supported.
Constructor: NewShimmer(id, class string) *Shimmer
Defaults: bandWidth = 6, edgeWidth = 3, gradient = off (linear falloff). The animation is not started automatically — call Start(interval) to begin.
Methods
SetText(s string) *Shimmer— replace text (split at\n); resets band positionText() string— current textSetBandWidth(n int) *Shimmer— core highlight width in columns (clamped to ≥ 1)SetEdgeWidth(n int) *Shimmer— gradient columns on each side of the core (0 = hard edge)SetGradient(on bool) *Shimmer— smooth cosine blending vs. stepped linear falloffTick()— animation frame; advances the band by one columnStart(interval time.Duration)— start animation (inherited fromAnimation)Stop()— stop and freeze in base style
Notes
Embeds Animation. Dispatches no events — pure display widget.
Style selectors: shimmer for the base text, shimmer/band for the highlight colour. The renderer interpolates between the two as the band passes.
Calling Stop() freezes the text mid-sweep. To restart, call Start(interval) again.