コンポーネント
Unit grid
@moga/data-motion · MOGA 公式
A share shown as cells (a waffle chart): the empty grid ripples in, then the filled cells pop in one after another in reading order while the big number beside it counts with them. Reads as "73 in every 100". Give it its own box (about 1400 × 640, or 700 × 900 to stack the number under the grid).
npx motioncn-cli add moga/data-motion/unit-gridバージョン 1.0.0MIT35 ダウンロード0 お気に入り
2026年12月3日 更新
MOGA で使う
バンドル全体ではなく、これだけをインポートします。使っているバンドルのトークンも一緒に入ります。プロジェクトフォルダで実行:
npx -y moga hub-import @moga/data-motion --items component:unit-gridMOGA の外で使う(Motioncn)
無料、アカウント不要。ふつうの Web コードなので、Web ページ、React、Remotion、HyperFrames で再生でき、MOGA と同じフレームを描きます。
shadcn でプロジェクトに追加
npx shadcn@latest add https://motioncn.dev/r/moga/data-motion/unit-grid.jsonshadcn を設定していなくても使えます
npx motioncn-cli add moga/data-motion/unit-gridビルドなしでページから import
import UnitGrid from 'https://motioncn.dev/m/moga/data-motion/unit-grid.js';
import preset from 'https://motioncn.dev/m/theme.js';
UnitGrid.mount(document.querySelector('#stage'), { preset, duration: 5 }).play();React、Remotion、HyperFrames
// React (https://motioncn.dev/r/player-react.json)
<Motion motion={UnitGrid} preset={preset} duration={5} fit />
// Remotion (https://motioncn.dev/r/player-remotion.json)
<MotionClip motion={UnitGrid} preset={preset} />
// HyperFrames (https://motioncn.dev/m/hyperframes.js)
follow(UnitGrid.mount(element, { preset, duration: 5 }), { start: 0 });
