Spring Motion
Replaces generic fade and slide effects with spring physics from @vueuse/motion.
Do not invent transition coordinates. Use the three presets below. Shell and data components stay in @quasar-foundation and @primevue-aura. A card that grows into its detail in the same view is @layout-morph (Quasar v-morph), not a spring on position.
When the agent activates this skill
- Introducing cards, modals, or list items to the DOM.
- Card hover states, focus depth, and button tap compressions.
- Staggering sequential data lists or dashboard panels.
Installation
npm install @vueuse/motion
Register MotionPlugin after PrimeVue in src/main.js. The bootstrap block is in @primevue-aura.
Physics profiles
// src/design/motion-presets.js
export const MotionPresets = {
// Snappy feedback for clicks, toggles, and icon buttons
microFeedback: {
hovered: { scale: 1.02, transition: { type: 'spring', stiffness: 400, damping: 25 } },
tapped: { scale: 0.97, transition: { type: 'spring', stiffness: 500, damping: 30 } }
},
// Structural panel / dialog entry
modalEnter: {
initial: { opacity: 0, scale: 0.95, y: 15 },
enter: {
opacity: 1,
scale: 1,
y: 0,
transition: { type: 'spring', stiffness: 280, damping: 22 }
}
},
// Stagger helper for lists / tables
staggerItem: (index) => ({
initial: { opacity: 0, y: 12 },
enter: {
opacity: 1,
y: 0,
transition: {
delay: Math.min(index * 35, 200), // Cap max delay to prevent slowness
type: 'spring',
stiffness: 320,
damping: 24
}
}
})
};
When a moment matches a preset, use the preset. The directive defaults apply only when none of the three presets fit:
- Interactive elements:
{ type: 'spring', stiffness: 350, damping: 25 }
- Dialogs and overlays:
{ type: 'spring', stiffness: 280, damping: 22 } (same as modalEnter)
Anti-AI-slop motion rules
- No linear transitions: never use
ease-in-out or linear timing for spatial movements (x, y, scale). Always use spring damping.
- Cap animation delays: never set list stagger delays greater than 40ms per item or total delay exceeding 200ms.
staggerItem uses 35ms and caps at 200ms.
- No continuous looping: avoid looping pulses, infinite rotations, or floating animations on UI elements unless explicitly requested for an active loading state.
- Provide a
prefers-reduced-motion path: skip spatial springs and use an instant opacity change.
Instructions
- Import
MotionPresets from src/design/motion-presets.js. Do not copy the numbers into a component as one-off values.
- Bind
v-motion to the preset that matches the moment.
- Do not animate layout properties that PrimeVue or Quasar already own (drawer width, virtual scroller position) unless the user asked for that motion.
- Loading indicators may loop. Everything else plays once.
When the task is complete: suggest next skills
When you have finished the user's request for this skill, suggest what to run next:
Run:
python .agents/skills/heyeddi/scripts/suggest_next_skill.py --current-skill motion-physics --project-root .
Include the script's ### Next step block in your final reply.
1---2name: motion-physics3description: "Spring micro-interactions for Vue 3 using @vueuse/motion. Use when introducing cards, dialogs, lists, hover, or press feedback. Forbids linear spatial easing, long staggers, and looping motion unless a loading state was requested."4version: 1.0.05product-version: 3.8.186author: HeyEddi-com7metadata:8 source: https://skillmd.com/skills/heyeddi-com/motion-physics9---1011# Spring Motion1213Replaces generic fade and slide effects with spring physics from `@vueuse/motion`.1415Do not invent transition coordinates. Use the three presets below. Shell and data components stay in `@quasar-foundation` and `@primevue-aura`. A card that grows into its detail in the same view is `@layout-morph` (Quasar `v-morph`), not a spring on position.1617## When the agent activates this skill1819- Introducing cards, modals, or list items to the DOM.20- Card hover states, focus depth, and button tap compressions.21- Staggering sequential data lists or dashboard panels.2223## Installation2425```bash26npm install @vueuse/motion27```2829Register `MotionPlugin` after PrimeVue in `src/main.js`. The bootstrap block is in `@primevue-aura`.3031## Physics profiles3233```js34// src/design/motion-presets.js35export const MotionPresets = {36 // Snappy feedback for clicks, toggles, and icon buttons37 microFeedback: {38 hovered: { scale: 1.02, transition: { type: 'spring', stiffness: 400, damping: 25 } },39 tapped: { scale: 0.97, transition: { type: 'spring', stiffness: 500, damping: 30 } }40 },4142 // Structural panel / dialog entry43 modalEnter: {44 initial: { opacity: 0, scale: 0.95, y: 15 },45 enter: {46 opacity: 1,47 scale: 1,48 y: 0,49 transition: { type: 'spring', stiffness: 280, damping: 22 }50 }51 },5253 // Stagger helper for lists / tables54 staggerItem: (index) => ({55 initial: { opacity: 0, y: 12 },56 enter: {57 opacity: 1,58 y: 0,59 transition: {60 delay: Math.min(index * 35, 200), // Cap max delay to prevent slowness61 type: 'spring',62 stiffness: 320,63 damping: 2464 }65 }66 })67};68```6970When a moment matches a preset, use the preset. The directive defaults apply only when none of the three presets fit:7172- Interactive elements: `{ type: 'spring', stiffness: 350, damping: 25 }`73- Dialogs and overlays: `{ type: 'spring', stiffness: 280, damping: 22 }` (same as `modalEnter`)7475## Anti-AI-slop motion rules7677- No linear transitions: never use `ease-in-out` or `linear` timing for spatial movements (`x`, `y`, `scale`). Always use spring damping.78- Cap animation delays: never set list stagger delays greater than 40ms per item or total delay exceeding 200ms. `staggerItem` uses 35ms and caps at 200ms.79- No continuous looping: avoid looping pulses, infinite rotations, or floating animations on UI elements unless explicitly requested for an active loading state.80- Provide a `prefers-reduced-motion` path: skip spatial springs and use an instant opacity change.8182## Instructions83841. Import `MotionPresets` from `src/design/motion-presets.js`. Do not copy the numbers into a component as one-off values.852. Bind `v-motion` to the preset that matches the moment.863. Do not animate layout properties that PrimeVue or Quasar already own (drawer width, virtual scroller position) unless the user asked for that motion.874. Loading indicators may loop. Everything else plays once.8889## When the task is complete: suggest next skills9091When you have **finished the user's request** for this skill, suggest what to run next:92931. Run:9495 ```bash96 python .agents/skills/heyeddi/scripts/suggest_next_skill.py --current-skill motion-physics --project-root .97 ```98992. Include the script's **`### Next step`** block in your **final** reply.