An animated grid pattern 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
- react
- three
- react-three-fiber
Code
import { AnimatedGridPattern } from "@/registry/eldoraui/animated-grid-pattern"
export function AnimatedGridPatternDemo() {
return (
<div className="bg-background relative mx-auto h-[500px] w-full overflow-hidden rounded-lg border">
<AnimatedGridPattern
gridSize={10}
gridWidth={4}
gridLength={4}
gap={0.05}
rippleScale={2.5}
rippleRadius={2}
cornerRadius={0.8}
cameraPosition={[-9.31, 12, 11.5]}
cameraRotation={[-0.65, -0.2, -0.13]}
fov={60}
/>
</div>
)
}




























