This component no longer exists. It was in motion-primitives’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-06 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.
Text Shimmer
motion-primitives/text-shimmerRemovedComponent
A component that applies a shimmering effect to text.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/ibelick/motion-primitives/HEAD/public/c/text-shimmer.jsonSource
1'use client';2import React, { useMemo, type JSX } from 'react';3import { motion } from 'motion/react';4import { cn } from '@/lib/utils';56export type TextShimmerProps = {7 children: string;8 as?: React.ElementType;9 className?: string;10 duration?: number;11 spread?: number;12};1314function TextShimmerComponent({15 children,16 as: Component = 'p',17 className,18 duration = 2,19 spread = 2,20}: TextShimmerProps) {21 const MotionComponent = motion.create(22 Component as keyof JSX.IntrinsicElements23 );2425 const dynamicSpread = useMemo(() => {26 return children.length * spread;27 }, [children, spread]);2829 return (30 <MotionComponent31 className={cn(32 'relative inline-block bg-[length:250%_100%,auto] bg-clip-text',33 'text-transparent [--base-color:#a1a1aa] [--base-gradient-color:#000]',34 '[background-repeat:no-repeat,padding-box] [--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--base-gradient-color),#0000_calc(50%+var(--spread)))]',35 'dark:[--base-color:#71717a] dark:[--base-gradient-color:#ffffff] dark:[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--base-gradient-color),#0000_calc(50%+var(--spread)))]',36 className37 )}38 initial={{ backgroundPosition: '100% center' }}39 animate={{ backgroundPosition: '0% center' }}40 transition={{41 repeat: Infinity,42 duration,43 ease: 'linear',44 }}45 style={46 {47 '--spread': `${dynamicSpread}px`,48 backgroundImage: `var(--bg), linear-gradient(var(--base-color), var(--base-color))`,49 } as React.CSSProperties50 }51 >52 {children}53 </MotionComponent>54 );55}5657export const TextShimmer = React.memo(TextShimmerComponent);
What it pulls in
npm packages
