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
- motion
Code
import VariableFontHoverByRandomLetter from "@/components/fancy/text/variable-font-hover-by-random-letter"
export default function Preview() {
return (
<div className="w-dvw h-dvh rounded-lg items-center justify-center font-overused-grotesk p-24 bg-linear-to-br text-[#1f464d] bg-white ">
<div className="w-full h-full items-center justify-center flex">
<VariableFontHoverByRandomLetter
label="Let's Go!"
staggerDuration={0.03}
className="rounded-full items-center flex justify-center cursor-pointer px-8 py-5 align-text-top text-4xl sm:text-5xl md:text-7xl"
fromFontVariationSettings="'wght' 400, 'slnt' 0"
toFontVariationSettings="'wght' 900, 'slnt' 0"
/>
</div>
</div>
)
}




























