3D scenes for shadcn/ui.
One command away.
Copy-paste React Three Fiber scenes that auto-adapt to your shadcn theme. Dark mode included. Zero Three.js expertise required.
pnpm dlx shadcn@latest add @threecn/particle-fieldComponents
Ready-to-use 3D scenes
A few favorites below. Each scene is a single file plus the theme hook — install it with the shadcn CLI and its colors follow your design tokens.
A soccer pitch of dots where two rival particle mountains surge and clash as momentum swings, crests whitening where the fronts collide.
pnpm dlx shadcn@latest add @threecn/pitch-momentumThe World Cup trophy modeled procedurally: two sculpted figures with raised arms lift a continent-embossed globe above a green-banded base, turning under studio light amid a drift of confetti.
pnpm dlx shadcn@latest add @threecn/world-cupA faceted glass gem with real refraction and a glowing core, tinted with --primary.
pnpm dlx shadcn@latest add @threecn/crystalA lava-lamp of liquid blobs that merge and split, surfaced with marching cubes and tinted --primary.
pnpm dlx shadcn@latest add @threecn/metaballsHyperspace star streaks racing past the camera, from --foreground heads to --primary tails.
pnpm dlx shadcn@latest add @threecn/warp-tunnelA 4D hypercube in double rotation projected into 3D — the inner cell endlessly swells through the outer, struts shading --accent to --primary by 4D depth.
pnpm dlx shadcn@latest add @threecn/tesseractHow it works
Three steps to themed 3D
Install
Add any scene with the shadcn CLI. The scene file and the useShadcnTheme hook land in your project.
npx shadcn@latest add @threecn/particle-fieldUse
Render it like any component. Set the height on the wrapper and you're done.
<ParticleField className="h-64 rounded-lg" />Customize
Scenes read your CSS variables. Change --primary and every scene follows — light or dark.
:root {
--primary: 263 70% 50%;
}
/* the scene re-colors itself automatically */
const { primaryColor, isDark } = useShadcnTheme()The bridge
Your tokens, in WebGL
Flip the theme or swap the accent. The scene re-reads your CSS variables through useShadcnTheme and recolors instantly — no props rewired.
Mode
Accent (--primary)
Tip: press d anywhere to toggle dark mode.