Toast noteToast note
Abrir no MOGA

Componente

Toast note

@moga/product-ui · Oficial do MOGA

Parte do pacote Product UI

A notification that drops in on a spring and leaves over the element's last 0.4 s. banner is a frosted system notification (app icon, title and time, two lines of body; about 720 × 168, it scales with the width), toast a compact pill (about 480 × 64, it scales with the height), snackbar a dark bar with an action (about 760 × 60). Its type reads on video from those sizes up. Drawn in the scheme's colours, so it follows light and dark. Size the element to the notification.

npx motioncn-cli add moga/product-ui/toast-note

Versão 1.0.1MIT39 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/product-ui --items component:toast-note

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/product-ui/toast-note.json

Sem shadcn configurado também funciona

npx motioncn-cli add moga/product-ui/toast-note

Importar numa página, sem build

import ToastNote from 'https://motioncn.dev/m/moga/product-ui/toast-note.js';
import preset from 'https://motioncn.dev/m/theme.js';
ToastNote.mount(document.querySelector('#stage'), { preset, duration: 5 }).play();

React, Remotion e HyperFrames

// React (https://motioncn.dev/r/player-react.json)
<Motion motion={ToastNote} preset={preset} duration={5} fit />
// Remotion (https://motioncn.dev/r/player-remotion.json)
<MotionClip motion={ToastNote} preset={preset} />
// HyperFrames (https://motioncn.dev/m/hyperframes.js)
follow(ToastNote.mount(element, { preset, duration: 5 }), { start: 0 });