- Docs
- Hilfe
- Motion läuft nicht
Docs for VelinStyle 1.3.x · verified against 1.3.0
Motion läuft nicht 1.3.0
Prüfe von der Initialisierung über die Policy und Reduced Motion bis zum expliziten Kill Switch. English
Problem
Attribute sind gesetzt, aber nichts animiert — oder Motion wird absichtlich unterdrückt.
Erste Prüfung
Führe zuerst die allgemeine Diagnose im Projektverzeichnis aus.
npx @birdapi/velinstyle doctor
Tiefer prüfen
npx @birdapi/velinstyle motion doctor .
npx @birdapi/velinstyle motion analyze .
npx @birdapi/velinstyle motion scan .
Schnellcheck
- Im richtigen Projektverzeichnis ausführen.
- Nur dokumentierte Profile und Flags verwenden.
- Nach jeder Änderung erneut prüfen.
Motion-Initialisierung fehlt
Ursache: initMotion wurde nie importiert/aufgerufen — Attribute haben keine Runtime.
- Lösung 1: Importiere
initMotion aus @birdapi/velinstyle/motion und rufe es einmal auf. - Lösung 2: Prüfe, dass der Motion-Export im Bundler auflöst.
- Lösung 3: Führe danach
npx @birdapi/velinstyle motion doctor . erneut aus.
Erneut prüfennpx @birdapi/velinstyle doctor
npx @birdapi/velinstyle check ./index.html --profile docs
Reduced Motion ist aktiv
Ursache: prefers-reduced-motion: reduce begrenzt oder deaktiviert Motion absichtlich.
- Lösung 1: Prüfe OS-/Browser-Einstellungen, bevor du Code änderst.
- Lösung 2: Biete eine nicht-animierte Fallback-UX statt erzwungener Animation.
- Lösung 3: Dokumentiere das erwartete Verhalten für A11y-Reviews.
Erneut prüfennpx @birdapi/velinstyle doctor
npx @birdapi/velinstyle check ./index.html --profile docs
Motion-Policy blockiert die Animation
Ursache: data-velin-motion-policy an einem Scope lehnt die beabsichtigte Motion ab.
- Lösung 1: Prüfe
data-velin-motion-policy am nächsten Vorfahren der toten Animation. - Lösung 2: Passe das Attribut an die erlaubte Motion an.
- Lösung 3: Prüfe erneut mit
motion analyze / motion scan am Projektpfad.
Erneut prüfennpx @birdapi/velinstyle doctor
npx @birdapi/velinstyle check ./index.html --profile docs
Motion wurde explizit deaktiviert
Ursache: data-velin-motion="off" ist ein bewusster Kill Switch.
- Lösung 1: Suche im DOM nach
data-velin-motion="off". - Lösung 2: Entferne oder ändere es nur, wenn Motion für diesen Scope nötig ist.
- Lösung 3: Prüfe erneut mit doctor und einem gezielten Page-Check.
Erneut prüfennpx @birdapi/velinstyle doctor
npx @birdapi/velinstyle check ./index.html --profile docs
Motion-Diagnostik findet ein Setup-Problem
Ursache: Motion-Tooling meldet Setup-Probleme, bevor der Animationscode falsch ist.
- Lösung 1: Führe
npx @birdapi/velinstyle motion doctor . aus und behebe zuerst das Setup. - Lösung 2: Nutze danach
motion analyze . und motion scan .. - Lösung 3: Erst dann Presets/Clips anpassen (z. B. create/setup).
Erneut prüfennpx @birdapi/velinstyle doctor
npx @birdapi/velinstyle check ./index.html --profile docs
Production hat Motion-Assets weggelassen
Ursache: production kann Motion weglassen, wenn --no-motion gesetzt ist oder Motion im gescannten HTML fehlt.
- Lösung 1: Baue ohne
--no-motion, wenn Motion nötig ist. - Lösung 2: Stelle sicher, dass Motion-Markup für den Production-Scanner sichtbar ist.
- Lösung 3: Erkläre den Build mit
production . --explain, bevor du andere Flags änderst.
Erneut prüfennpx @birdapi/velinstyle doctor
npx @birdapi/velinstyle check ./index.html --profile docs