Web Component Utils

Framework-agnostic web components with live examples

📦 Available Components

🔍 Intersection Observer

Detects when content becomes visible in the viewport - perfect for lazy loading, animations, and analytics.

  • Event-based API with custom event names
  • Configurable threshold and root margin
  • Shadow DOM with slot support
  • Works with any framework or vanilla JS

🌐 Get Request

Handles GET requests with built-in caching, loading states, and error handling.

  • Built-in LRU cache with configurable size
  • Automatic fetching when URL changes
  • Custom event names for loading, success, and error states
  • Manual and automatic fetch modes

📦 Vanilla JavaScript

Pure JavaScript implementation with no framework dependencies

⚛️ React

React integration examples with hooks and modern patterns

💚 Vue

Vue 3 integration with Composition API

View on GitHub →