Getting Started
kam-ui is a registry of animated background components for React. Install via the shadcn CLI or copy the source directly.
Prerequisites
Your project needs React, Tailwind CSS v4, and a shadcn-compatible setup.
Some components use ogl for WebGL rendering. The shadcn installer handles this dependency automatically.
Install a component
Each component ships as a standalone registry JSON file. Install with the shadcn CLI:
npx shadcn@latest add https://ui.philippekam.dev/r/radiant-veil.json
Replace radiant-veil with any component slug. The installer resolves registryDependencies automatically, including kam-utils (the cn() helper) and kam-containment (viewport pause and motion queries).
Browse the full registry index:
https://ui.philippekam.dev/r/registry.json
Manual install
If you prefer not to use the CLI:
- Copy the component source from the Source tab on any component page
- Save it to your project (e.g.
components/ui/) - Install peer dependencies:
npm install clsx tailwind-merge - Copy
lib/utils.ts(cn()helper) andlib/containment.tsfrom the registry - For WebGL components, also install
ogl
Usage
Every component is a React element that fills its container. Wrap it in a positioned parent:
import { RadiantVeil } from "@/components/ui/radiant-veil";
export function Hero() {
return (
<section className="relative min-h-[60vh] overflow-hidden">
<RadiantVeil color="#7c3aed" from="top" />
<div className="relative z-10 p-8">
Your content here
</div>
</section>
);
} Each component page has a Usage tab with full examples and a Props reference.
Assets
Most components are fully procedural. Two require external assets that the registry cannot distribute:
Milky Way
Requires public/milky-way/milky-way.jpg (~945 KB).
Download from the kam-ui repo.
Credit: ESA/Gaia/DPAC (CC BY-SA 3.0 IGO)
Black Hole
Requires the public/black-hole/ folder (~3.6 MB, 5 files).
Download from the kam-ui repo.
License: BSD-3-Clause (Eric Bruneton)