Install the engine, a renderer or an example with the shadcn CLI, by URL or by name, from your terminal or an AI agent.
Get started · 2 min read
Prompt for your agent
Your agent reads /docs/installation.md: the same text as this page, as Markdown.
Run each command in the root folder of your project. Your project needs shadcn: if it has no components.json, run npx shadcn@latest init once.
Install by URL
The URL works in any project with shadcn. It needs no other setup:
npx shadcn@latest add https://dotsengine.dev/r/dot-matrix.jsonWith pnpm, use pnpm dlx shadcn@latest. With Bun, use bunx --bun shadcn@latest.
Install by name
Add our registry to components.json once:
{
"registries": {
"@dots-engine": "https://dotsengine.dev/r/{name}.json"
}
}Then install items by name, and search the registry:
npx shadcn@latest add @dots-engine/dot-matrix
npx shadcn@latest search @dots-engineWhat to install
| Item | What you get |
|---|---|
dot-matrix | The engine: the DotMatrix component and the canvas renderer |
dot-matrix-webgl | One shared WebGL2 context, for large fields or many loaders |
dot-matrix-svg | Vector dots, sharp at any zoom |
dot-matrix-dom | Spans moved by the compositor, smooth while the page is busy |
<pattern>-<layout>, such as radar-circle | A ready example on the engine |
A renderer or an example installs the engine with it. Examples explains the example files.
Frameworks and browsers
- Next.js (App Router), TanStack Start, React Router and Vite.
DotMatrixis a client component ("use client"), so you can render it from a Server Component page. The server renders the first frame, so the pattern shows before any script runs. - React 19 and a TypeScript
libof ES2022 or newer. - Browsers: current Chrome, Edge, Firefox and Safari (iOS 16.4 and newer). The WebGL renderer needs WebGL2.
- Bake worker: patterns bake in a Web Worker that your bundler emits as its own file (Vite, Turbopack and webpack all do). A Content Security Policy needs
worker-src 'self'. With no worker, patterns bake on the page in idle time.
License
Every item is free under the MIT license with the Commons Clause. Use the items in any app, free or paid. You cannot sell the items themselves. See the License page.
Use an AI agent
Your agent can install items and write the code that uses them. Use with your AI agent has the setup for Claude Code, Cursor, Codex, Kiro, GitHub Copilot, Windsurf, Gemini CLI and OpenCode.
After you install
Open the new files in your ui folder (components/ui/, or src/components/ui/ in Vite and TanStack Start). Check the imports, then change what you need. The CLI does not update your copy later: run the install command again to get a new version.