Composant
Toast note
@moga/product-ui · Officiel MOGA
Fait partie du pack 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-noteVersion 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:toast-noteL'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/toast-note.jsonSans shadcn configuré, ceci marche aussi
npx motioncn-cli add moga/product-ui/toast-noteL'importer dans une page, sans 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 et 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 });
