component-decomposition

Translate React or Framer Motion components into layered vanilla implementations.

Updated Apr 8, 2024
One-click install
npx skills add https://github.com/tumes/dotfiles-nvim --skill component-decomposition
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-decomposition
Source: https://github.com/tumes/dotfiles-nvim/tree/main/claude/skills/component-decomposition
Command: npx skills add https://github.com/tumes/dotfiles-nvim --skill component-decomposition

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use when migrating complex React/Framer Motion components to vanilla implementations, or when building new interactive components - layers static markup, styling, CSS animations, then vanilla JS only where needed

Core Features & Use Cases

  • Layered migration approach: separate static markup, styling, motion, and behavior for clear verification.
  • Framework-agnostic outputs: produce vanilla implementations that work without React or Framer Motion.
  • Performance and maintenance gains: reduce JS footprint by removing heavy libraries and keeping behavior minimal.
  • Verification-driven: each layer can be independently tested against the original behavior.

Quick Start

Decompose an existing React component into static markup, add CSS for styling, then implement vanilla JS only for behavior that CSS cannot achieve.

Frequently Asked Questions about component-decomposition

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate React components to vanilla JavaScript?

Migrate React components to vanilla JavaScript by applying a four-layer workflow: extract static markup, add styling, implement CSS motion, and use vanilla JS only for behavior CSS cannot replicate. Verify each layer against the original for structural and interactive fidelity.

What is the best way to convert Framer Motion animations to CSS?

Convert Framer Motion animations to CSS by identifying the target motion properties and recreating them in the CSS Motion layer. Apply the four-layer decomposition workflow to ensure the final vanilla implementation preserves element structure and interactive behavior without requiring the Framer Motion library.

How do I remove React and Framer Motion dependencies from my UI?

Remove React and Framer Motion dependencies by decomposing your components into framework-agnostic vanilla implementations. This layered migration approach produces standalone static markup, CSS, and minimal vanilla JS, reducing your JavaScript footprint and eliminating heavy library requirements.

Can I translate complex interactive UI into vanilla JS without losing behavior?

Translate complex interactive UI into vanilla JS without losing behavior by verifying each decomposition layer against the original component. The workflow ensures element structure, class names, and interactive behavior are preserved, using vanilla code only where CSS cannot achieve the required motion or interaction.

When should I use a layered migration approach for frontend component decomposition?

Use a layered migration approach for frontend component decomposition when migrating complex React or Framer Motion components to vanilla implementations, or building new interactive components. Separating static markup, styling, motion, and behavior allows each layer to be independently tested for performance and maintenance gains.