A ui component.
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
- lodash
- motion
Code
import RandomLetterSwapForward from "@/components/fancy/text/random-letter-swap-forward-anim"
import RandomLetterSwapPingPong from "@/components/fancy/text/random-letter-swap-pingpong-anim"
export default function Preview() {
return (
<div className="w-dvw h-dvh rounded-lg bg-white text-3xl md:text-5xl flex flex-col items-center justify-center font-overused-grotesk">
<div className="h-full text-red-500 rounded-xl py-12 align-text-center gap-y-1 md:gap-y-2 flex flex-col justify-center items-center">
<RandomLetterSwapForward
label="Right here!"
reverse={true}
className=""
/>
<RandomLetterSwapForward
label="Right now!"
reverse={false}
className="font-bold italic px-4"
/>
<RandomLetterSwapPingPong label="Right here!" className="" />
<RandomLetterSwapPingPong
label="Right now!"
reverse={false}
className=" font-bold"
/>
</div>
</div>
)
}




























