Unit gridUnit grid
Abrir no MOGA

Componente

Unit grid

@moga/data-motion · Oficial do MOGA

Parte do pacote Data motion

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

Versão 1.0.0MIT35 downloads0 favoritos

Atualizado em 3 de dezembro de 2026

Usar no MOGA

Importe só este, sem o resto do bundle. Os tokens do bundle que ele usa vêm junto. Execute na pasta do projeto:

npx -y moga hub-import @moga/data-motion --items component:unit-grid

Usar fora do MOGA (Motioncn)

Grátis, sem conta. É código web comum que roda numa página, React, Remotion e HyperFrames, com os mesmos quadros que o MOGA renderiza.

Adicionar ao projeto com shadcn

npx shadcn@latest add https://motioncn.dev/r/moga/data-motion/unit-grid.json

Sem shadcn configurado também funciona

npx motioncn-cli add moga/data-motion/unit-grid

Importar numa página, sem build

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