import-on-interaction

Defer non-critical UI code until user interaction with dynamic imports.

Updated Oct 26, 2025
One-click install
npx skills add https://github.com/jcsoftdev/pulzifi-back --skill import-on-interaction-jcsoftdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: import-on-interaction
Source: https://github.com/jcsoftdev/pulzifi-back/tree/main/.claude/skills/import-on-interaction
Command: npx skills add https://github.com/jcsoftdev/pulzifi-back --skill import-on-interaction-jcsoftdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Non-critical UI code and heavy dependencies are loaded eagerly, slowing initial render and degrading Time to Interactive.

Core Features & Use Cases

  • Dynamic import on user interaction (clicks, hovers) to gate expensive modules
  • Facade placeholders to preserve UX while the real code loads
  • Framework-agnostic guidance for React, Vue, and vanilla JS patterns

Quick Start

Click the interactive element to load the heavy widget on demand.

Frequently Asked Questions about import-on-interaction

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

FAQPage Schema
How do I lazy load heavy UI components on user click?

Lazy loading heavy UI components on user click uses dynamic imports to defer non-critical code until interaction occurs. This reduces initial bundle size and improves Time to Interactive by scaffolding facade placeholders while the real module loads.

What is dynamic import on interaction for code splitting?

Dynamic import on interaction is a code splitting pattern that gates expensive modules behind user events like clicks or hovers. It prevents third-party widgets and heavy dependencies from degrading initial render performance.

Can I use import-on-interaction patterns with Vue and vanilla JavaScript?

Import-on-interaction patterns work with Vue and vanilla JavaScript alongside React. The approach provides framework-agnostic guidance for progressive loading, applying dynamic imports to defer feature loads until clicks, hovers, or form inputs happen.

Why does loading third-party widgets eagerly slow down Time to Interactive?

Loading third-party widgets eagerly slows Time to Interactive because heavy dependencies block initial render. Deferring these non-critical UI modules until user interaction with facade placeholders preserves UX and frees up the main thread.

What's the best way to delay heavy feature loads until user interaction?

The best way to delay heavy feature loads is combining dynamic imports with facade placeholders. This progressive loading strategy gates expensive modules behind user actions, ensuring only necessary code executes after clicks or hovers.

When should I not use lazy loading for dynamic imports?

You should not use lazy loading for dynamic imports when UI components are critical for initial render or required immediately. Deferring above-the-fold content delays Time to Interactive and breaks UX expectations for essential features.