Usage
Install Dot Matrix from the registry
Dot Matrix loaders ship through a custom shadcn registry (scoped as @dotmatrix in the CLI) so the install flow stays familiar: configure once, pull the items you need, then adapt each loader to your product.
Prerequisites
- - React app already running
- - Tailwind CSS configured
- - `components.json` present for shadcn CLI
- - path aliases aligned with your component structure
If your project does not have `components.json` yet, initialize shadcn first.
Initialize shadcn
Configure the registry
Add the @dotmatrix entry in the registries field of components.json so the CLI can resolve items like @dotmatrix/dotm-square-3.
components.json
Install a component
Pull any loader into your app with the shadcn CLI:
Install loader
Or install everything in one step:
Install all loaders
- - `@dotmatrix/dotm-square-3`
- - `@dotmatrix/dotm-circular-5`
- - `@dotmatrix/dotm-triangle-2`
- - `@dotmatrix/all`
Installed files are local. Rename, restyle, and retime motion as needed.
Ensure loader styles are imported
Dot Matrix loaders depend on dotmatrix-loader.css. If your setup does not inject it automatically, add this import in app/globals.css.
globals.css
Use in real UI states
Keep indicators close to the action they describe. Inline usage works well when only part of the interface is pending.
Save button example
Usage guidelines
- - Use inline loaders when only a local region is pending.
- - Prefer skeletons when preserving content shape matters most.
- - Pair motion with accessible text when context is not obvious.
- - Avoid multiple competing loaders in one viewport.
Next step
Browse the components gallery for specific primitives, or read the introduction for what Dot Matrix is aiming for and its constraints.