---
name: "gsap-flip-layout-transitions"
description: "Morph elements seamlessly between layout states and DOM parents using GSAP Flip."
metadata:
  author: "GreenSock"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "morph elements with gsap flip"
  - "animate grid reorder gsap"
  - "record flip state gsap"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# GSAP Flip Plugin Seamless Layout Morphs

Leverages First-Last-Invert-Play (FLIP) technique with GSAP Flip plugin: capturing element layout states, reordering DOM grids, filtering card categories, and morphing without layout jumps.

## When to Invoke
Invoke this skill whenever you need to:
- morph elements with gsap flip
- animate grid reorder gsap
- record flip state gsap

## Execution SOP & Rules
1. Record layout before DOM change: const state = Flip.getState(targets).
2. Modify DOM structure or toggle CSS classes, then trigger Flip.from(state, { duration: 0.6, ease: 'power2.out' }).
3. Specify absolute: true if elements might collide or cause reflow during transition.
4. Include nested children with nested: true when inner text or images must scale smoothly.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
