This component no longer exists. It was in shadcn/ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-13 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.
Animated Text Demo
nyxui/animated-text-demoRemovedExample
Example showing various text animations.
Install it
npx shadcn@latest add https://nyxui.com/r/animated-text-demo.jsonSource
1"use client";2import React, { useState } from "react";3import reactElementToJSXString from "react-element-to-jsx-string";4import { toast, Toaster } from "sonner";5import { AnimateText } from "../ui/animated-text";6import { Copy, Check } from "lucide-react";78interface AnimationCard {9 children: React.ReactNode;10 onClick: () => void;11 isCopied: boolean;12 title: string;13}1415type AnimatedTextType = {16 name: string;17 description: string;18 component: React.ReactNode;19 code?: string;20};2122const AnimationCard = ({23 children,24 onClick,25 isCopied,26 title,27}: AnimationCard) => {28 return (29 <div30 className="border group relative rounded-lg p-3 sm:p-4 shadow-sm hover:shadow-md transition-shadow duration-300 cursor-pointer bg-background"31 onClick={onClick}32 >33 <p className="text-xs sm:text-sm font-semibold mb-2">{title}</p>34 <div className="overflow-hidden">{children}</div>35 <div className="absolute top-2 right-2">36 {isCopied ? (37 <Check className="h-3 w-3 text-green-500 transition-all duration-200" />38 ) : (39 <Copy className="h-3 w-3 text-zinc-300 dark:text-zinc-700 group-hover:text-zinc-500 group-hover:dark:text-zinc-500" />40 )}41 </div>42 </div>43 );44};4546export const AnimationTextDemo = () => {47 const [copiedIndex, setCopiedIndex] = useState<number | null>(null);4849 const copy = (animation: AnimatedTextType, index: number) => {50 if (animation.code) {51 copyToClipboard(animation.code, index);52 return;53 }54 let animationString = reactElementToJSXString(animation.component, {55 displayName: (element) => {56 if (57 typeof element === "object" &&58 element !== null &&59 "type" in element &&60 // eslint-disable-next-line @typescript-eslint/no-explicit-any61 (element as any).type?.name === "AnimateText"62 ) {63 return "AnimateText";64 }65 if (66 typeof element === "object" &&67 element !== null &&68 "type" in element &&69 // eslint-disable-next-line @typescript-eslint/no-explicit-any70 (element as any).type?.name71 ) {72 // eslint-disable-next-line @typescript-eslint/no-explicit-any73 return (element as any).type.name;74 }75 return "UnknownComponent";76 },77 functionValue: (fn) => fn.name || "function",78 });7980 if (animationString) {81 const textToCopy = animationString;82// … truncated
What it pulls in
Other registry items
