コンポーネント
Count up
@moga/data-motion · MOGA 公式
One big number that lands on its value: each digit spins like a slot reel and settles left to right (or counts on a long decelerating curve), with a prefix, a suffix and a label; plain on the frame or on a tile with a filling bar. Give it its own box (about 1200 × 600 plain, 640 × 560 as a tile).
npx motioncn-cli add moga/data-motion/count-upバージョン 1.0.0MIT35 ダウンロード0 お気に入り
2026年12月3日 更新
MOGA で使う
バンドル全体ではなく、これだけをインポートします。使っているバンドルのトークンも一緒に入ります。プロジェクトフォルダで実行:
npx -y moga hub-import @moga/data-motion --items component:count-upMOGA の外で使う(Motioncn)
無料、アカウント不要。ふつうの Web コードなので、Web ページ、React、Remotion、HyperFrames で再生でき、MOGA と同じフレームを描きます。
shadcn でプロジェクトに追加
npx shadcn@latest add https://motioncn.dev/r/moga/data-motion/count-up.jsonshadcn を設定していなくても使えます
npx motioncn-cli add moga/data-motion/count-upビルドなしでページから import
import CountUp from 'https://motioncn.dev/m/moga/data-motion/count-up.js';
import preset from 'https://motioncn.dev/m/theme.js';
CountUp.mount(document.querySelector('#stage'), { preset, duration: 5 }).play();React、Remotion、HyperFrames
// React (https://motioncn.dev/r/player-react.json)
<Motion motion={CountUp} preset={preset} duration={5} fit />
// Remotion (https://motioncn.dev/r/player-remotion.json)
<MotionClip motion={CountUp} preset={preset} />
// HyperFrames (https://motioncn.dev/m/hyperframes.js)
follow(CountUp.mount(element, { preset, duration: 5 }), { start: 0 });
