Model viewer
A tiny 3D viewer for shapes built in code (cube, gem, low-poly rock) with drag-to-orbit, wheel and keyboard orbit and zoom.
What it is for
Product or brand 3D previews where model files are overkill (fills its parent).
Use it
1 · site.json
"effects": { "components": ["model-viewer"] }or on the command line
node ~/.claude/skills/sitewright/scripts/scaffold.mjs --config site.json --out ./my-site --components model-viewer2 · import it
import { ModelViewer } from '@/components/fx/ui';Files
components/fx/ui/ModelViewer.tsxcomponents/fx/ui/_inputs-mesh.tscomponents/fx/ui/_inputs-ui.tscomponents/fx/ui/_t2.tsui-model-viewer.cssstyles
Accessibility
- Keyboard. Components in the kit are written to be reached and used with the keyboard. Try it: press Tab inside the preview.
- Reduced motion. With
prefers-reduced-motionon, animation settles to its finished state at once. - Touch. Pointer-follow effects are skipped on touch screens; controls stay finger-sized.