This component no longer exists. It was in sv11-twango’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-09 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Shimmering Text
sv11-twango/shimmering-textRemovedComponent
A text component with an animated shimmer effect, optionally triggered when scrolled into view.
Live preview
live · rendered by the registry
Rendered by sv11-twango on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add http://sv11.ui.twango.dev/r/shimmering-text.jsonSource
1<script lang="ts">2 import { cn } from "$UTILS$.js";3 import { animate, inView } from "motion";45 let {6 text,7 duration = 2,8 delay = 0,9 repeat = true,10 repeatDelay = 0.5,11 class: className,12 startOnView = true,13 once = false,14 inViewMargin,15 spread = 2,16 color,17 shimmerColor,18 }: {19 /** Text to display with the shimmer effect. */20 text: string;21 /**22 * Duration of one shimmer sweep in seconds.23 * @default 224 */25 duration?: number;26 /**27 * Seconds to wait before the first sweep begins.28 * @default 029 */30 delay?: number;31 /**32 * Whether the shimmer sweep loops indefinitely.33 * @default true34 */35 repeat?: boolean;36 /**37 * Pause between repeats in seconds when `repeat` is `true`.38 * @default 0.539 */40 repeatDelay?: number;41 /** Extra classes merged onto the root `<span>`. */42 class?: string;43 /**44 * When `true`, the animation only starts once the element scrolls into45 * view. When `false`, it begins on mount.46 * @default true47 */48 startOnView?: boolean;49 /**50 * When `true`, the animation fires a single time and never again.51 * When `false`, it replays each time the element re-enters the viewport.52 * @default false53 */54 once?: boolean;55 /**56 * Root margin passed to the underlying Motion `inView` observer — used57 * to shrink or expand the viewport trigger area (e.g. `"0px 0px -10%"`).58 */59 inViewMargin?: NonNullable<Parameters<typeof inView>[2]>["margin"];60 /**61 * Spread multiplier applied to the shimmer highlight width. The final62 * spread scales with text length (`text.length * spread` pixels).63 * @default 264 */65 spread?: number;66 /** Base text color. Defaults to `var(--muted-foreground)`. */67 color?: string;68 /** Highlight gradient color. Defaults to `var(--foreground)`. */69 shimmerColor?: string;70 } = $props();7172 let ref = $state<HTMLSpanElement>();73 let isInView = $state(false);74 let hasAnimated = $state(false);75 let shimmerControls: ReturnType<typeof animate> | undefined;76 let fadeControls: ReturnType<typeof animate> | undefined;7778 let dynamicSpread = $derived(text.length * spread);79 let shouldAnimate = $derived(!startOnView || isInView);8081 // Viewport detection82 $effect(() => {83 if (!ref) return;84 return inView(85 ref,86 () => {87 isInView = true;88 if (!once) {89 return () => {90 isInView = false;91 };92 }93 },94 { margin: inViewMargin }95 );96 });9798 // Shimmer animation99 $effect(() => {100 if (!ref || !shouldAnimate) return;101// … truncated
What it pulls in
npm packages
