コンポーネント
Toast note
@moga/product-ui · MOGA 公式
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バージョン 1.0.1MIT39 ダウンロード0 お気に入り
2026年12月3日 更新
MOGA で使う
バンドル全体ではなく、これだけをインポートします。使っているバンドルのトークンも一緒に入ります。プロジェクトフォルダで実行:
npx -y moga hub-import @moga/product-ui --items component:toast-noteMOGA の外で使う(Motioncn)
無料、アカウント不要。ふつうの Web コードなので、Web ページ、React、Remotion、HyperFrames で再生でき、MOGA と同じフレームを描きます。
shadcn でプロジェクトに追加
npx shadcn@latest add https://motioncn.dev/r/moga/product-ui/toast-note.jsonshadcn を設定していなくても使えます
npx motioncn-cli add moga/product-ui/toast-noteビルドなしでページから import
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、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 });
