Loading preview
A dotted 3D Earth with glowing routes between cities; pulses travel each arc and ripple where they land.
A WebGL spiral galaxy of glowing particles that turns and leans toward the pointer.
npx shadcn@latest add @venusui/particle-galaxyRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/hooks/use-scene-state.tsfrom use-scene-state@/components/ui/particle-galaxy.tsxThe code behind the preview above.
particle-galaxy-demo.tsx
import { ParticleGalaxy } from "@/components/ui/particle-galaxy"
export default function ParticleGalaxyDemo() {
return (
<div className="dark w-full overflow-hidden rounded-xl border bg-background">
<ParticleGalaxy className="h-80" count={30000} />
</div>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| count | number | 40000 | Number of particles. |
| arms | number | 4 | Number of spiral arms. |
| colors | [string, string, string] | peach, violet, sky | Core, middle and rim colors (hex, rgb() or hsl()). |
| speed | number | 0.06 | Turning speed in radians per second. |
| followPointer | boolean | true | Lean the camera toward the pointer. |
| label | string | "Spiral galaxy of glowing particles" | Accessible description. |
Only the props above, plus className (set the height, e.g. h-96).
three and @react-three/fiber (React 19). The CLI installs both, plus @types/three as a dev dependency.count (around 15000) for low-end phones.oklch(); use hex, rgb() or hsl().Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A dotted 3D Earth with glowing routes between cities; pulses travel each arc and ripple where they land.
A WebGL sphere of evenly spaced dots that slowly turns; drag or use the arrow keys to spin it.
A WebGL field of points rolling like a wave, for hero and section backgrounds.