ModelViewer
A rotating product viewer with keyboard and on-screen controls.
3Dimport { ModelViewer } from 'umbra-ui/3d'
Props
| Prop | Type | Default | Description |
|---|---|---|---|
aria-label required | string | — | Accessible name describing the model, e.g. "Headphones, matte black". Required. |
autoRotate | boolean | true | Spin slowly until the user interacts. Never spins under reduced motion. |
fallback | ReactNode | — | Replaces the built-in static fallback shown when WebGL is unavailable, the scene fails to load, or motion is reduced. |
hideControls | boolean | false | Hide the on-screen control buttons (keyboard and drag still work). |
labels | Partial<ModelViewerLabels> | — | Override control labels for localisation. |
model | ReactNode | — | React Three Fiber elements to show instead of a file (rendered inside the canvas). |
quality | "low" | "medium" | "high" | medium | Rendering budget: DPR cap 1 / 1.5 / 2 and proportionally fewer or more polygons and particles. |
reducedMotion | "system" | "always" | "never" | "system" | Reduced-motion override. Under reduced motion the static fallback is rendered instead of the scene. |
src | string | — | URL of a glTF / GLB file. Without `src` or `model`, a demo torus knot is shown. |
Usage notes
Pass src (glTF / GLB) or model (React Three Fiber elements).
Accessibility
- A labelled
groupwith atoolbarof real buttons: rotate, zoom, reset, pause. - With focus inside: ←/→/↑/↓ rotate, +/− zoom, Home resets.
- Auto-rotation has a pause button and stops on first interaction (WCAG 2.2.2).
- Under reduced motion it keeps rendering but never moves on its own.
Import
import { ModelViewer } from 'umbra-ui/3d';
import 'umbra-ui/styles.css'; // once, at the root of your app