3D device3D device
Ouvrir dans MOGA

Composant

3D device

@moga/product-ui · Officiel MOGA

Fait partie du pack Product UI

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-3d

Version 1.0.1MIT39 téléchargements0 favoris

Mis à jour le 3 décembre 2026

L'utiliser dans MOGA

Importez seulement celui-ci, sans le reste du bundle. Les tokens du bundle qu’il utilise viennent avec. Lancez dans le dossier du projet :

npx -y moga hub-import @moga/product-ui --items component:device-3d

L'utiliser hors de MOGA (Motioncn)

Gratuit, sans compte. C'est du code web ordinaire qui se lit dans une page, React, Remotion et HyperFrames, avec les mêmes images que MOGA.

L'ajouter à votre projet avec shadcn

npx shadcn@latest add https://motioncn.dev/r/moga/product-ui/device-3d.json

Sans shadcn configuré, ceci marche aussi

npx motioncn-cli add moga/product-ui/device-3d

L'importer dans une page, sans build

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 et 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 });