Komponente
3D device
@moga/product-ui · Offiziell von MOGA
A phone or a laptop in real 3D (three.js), modelled from rounded shapes: metal lit by a soft studio, glass that catches the light, and a screen that shows a screenshot. It turns in on its own, the laptop's lid opens, and it floats gently. Key turn, tilt, open, zoom and scroll. Give it a roomy box (e.g. 900 × 900 for a phone, 1600 × 1000 for a laptop); the device fills about 80 % of it.
npx motioncn-cli add moga/product-ui/device-3dVersion 1.0.1MIT39 Downloads0 Favoriten
Aktualisiert am 3. Dezember 2026
In MOGA verwenden
Nur dieses importieren, ohne den Rest des Bundles. Tokens des Bundles, die es nutzt, kommen mit. Im Projektordner ausführen:
npx -y moga hub-import @moga/product-ui --items component:device-3dAußerhalb von MOGA verwenden (Motioncn)
Kostenlos, ohne Konto. Es ist normaler Webcode, der in einer Webseite, React, Remotion und HyperFrames läuft und dieselben Frames zeichnet wie MOGA.
Mit shadcn ins Projekt holen
npx shadcn@latest add https://motioncn.dev/r/moga/product-ui/device-3d.jsonOhne shadcn-Setup geht es auch
npx motioncn-cli add moga/product-ui/device-3dOhne Build in einer Seite importieren
import Device3d from 'https://motioncn.dev/m/moga/product-ui/device-3d.js';
import preset from 'https://motioncn.dev/m/theme.js';
Device3d.mount(document.querySelector('#stage'), { preset, duration: 5 }).play();React, Remotion und HyperFrames
// React (https://motioncn.dev/r/player-react.json)
<Motion motion={Device3d} preset={preset} duration={5} fit />
// Remotion (https://motioncn.dev/r/player-remotion.json)
<MotionClip motion={Device3d} preset={preset} />
// HyperFrames (https://motioncn.dev/m/hyperframes.js)
follow(Device3d.mount(element, { preset, duration: 5 }), { start: 0 });
