threecn
Open source3D scenes for shadcn/ui. One command away.
About
Putting a 3D scene in a React app usually means learning Three.js first, then fighting it to match your design. threecn skips both: ready-made React Three Fiber scenes, installed exactly the way you already install a shadcn component.
Every scene is theme-aware. A useShadcnTheme() hook reads --primary, --background, --border and the rest straight from the document, parses them into Three.js colours, and watches the dark class with a MutationObserver. Toggle the theme and every mounted scene recolours on the next frame — no props to wire, no palette kept in two places.
Published in the shadcn registry under the @threecn namespace, so one command drops the source of a scene into your project, yours to edit. Documentation and live previews built with Fumadocs. MIT licensed.
Features
- 27 scenes, from particle fields to globes, warp tunnels and metaballs
- Installed with the shadcn CLI — the source lands in your project
- Scenes recolour themselves from your own CSS variables
- Dark mode handled without a line of configuration
- Documentation and live previews built with Fumadocs
Stack
- Next.js
- React
- TypeScript
- Three.js
- React Three Fiber
- drei
- Tailwind CSS v4
- shadcn/ui
- Fumadocs
Info
- Platform
- Web
- License
- MIT