Typographic block that mixes plain copy with inline highlights carrying bespoke animated SVG icons — a heart that beats a real lub-dub, twinkling sparkles, a clicking cursor, a launching rocket — that come alive on hover or focus.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
npm packages it adds
- motion
Code
"use client";
import AnimatedHighlightText, {
HeartIcon,
Highlight,
MousePointerClickIcon,
SparklesIcon,
} from "@/registry/ruixenui/animated-highlight-text";
const CDN = "https://ruixen.com/card-slides";
export default function AnimatedHighlightTextDemo() {
return (
<div className="flex min-h-[420px] w-full items-center justify-center px-8 py-20">
<AnimatedHighlightText className="text-center">
Every interface deserves thoughtful craft: effortlessly{" "}
<Highlight
icon={<MousePointerClickIcon />}
image={`${CDN}/card-slide-01.jpg`}
imageAlt="Built"
>
built
</Highlight>
, truly{" "}
<Highlight
icon={<HeartIcon />}
color="#ef4444"
image={`${CDN}/card-slide-02.jpg`}
imageAlt="Loved"
>
loved
</Highlight>
, beautifully{" "}
<Highlight
icon={<SparklesIcon />}
image={`${CDN}/card-slide-03.jpg`}
imageAlt="Polished"
>
polished
</Highlight>
.
</AnimatedHighlightText>
</div>
);
}
































