14 个仓库
Using the IntersectionObserver API to detect element visibility within the viewport.
Distinct from Viewport Event Listeners: Existing candidates focused on geolocation or system-level change detection rather than viewport visibility observers.
Explore 14 awesome GitHub repositories matching web development · Intersection Observer Implementations. Refine with filters or upvote what's useful.
AOS is a scroll-triggered animation library that controls the execution, timing, and mapping of CSS transitions based on element visibility and browser viewport intersections. It functions as a DOM element animation controller and a viewport intersection trigger to initiate visual transitions as elements enter the screen. The library utilizes a custom CSS transition bridge to map scroll-based triggers to CSS class changes, enabling integration with external styling frameworks. It supports anchor-based animation triggers, allowing the visibility of one page element to act as the trigger point
Uses the IntersectionObserver API to detect element visibility within the viewport to initiate CSS transitions.
ScrollReveal is a client-side JavaScript library used to trigger CSS animations and transitions for page elements as they enter the browser viewport. It functions as a DOM element animation trigger and a simplified wrapper for the Intersection Observer API to coordinate visual entrance effects and staggered animations based on the user's scroll position. The library focuses on scroll-driven motion and reveal effects, enabling the execution of visual changes and animations automatically as a user navigates a website. It manages the reveal of page content to create movement and progression with
Uses the native Intersection Observer API to detect when elements enter the viewport.
vue-lazyload is a Vue.js image lazy loading plugin and frontend asset optimizer. It serves as a viewport visibility observer that defers the loading of images and components until they enter the browser viewport to reduce initial page load times. The project functions as a progressive image loader by managing image placeholders and implementing dynamic source switching. It uses a browser API to monitor when elements enter the viewport, avoiding expensive scroll event listeners to maintain performance. The plugin provides capabilities for image loading state tracking, including custom placeho
Uses the IntersectionObserver API to monitor element visibility without expensive scroll event listeners.
该项目是一个原生 JavaScript 库和 Web 性能优化工具,旨在推迟图像、视频和 iframe 的加载,直到它们进入浏览器视口。它充当交叉观察器(Intersection Observer)封装器和自适应媒体加载器,以减少初始页面加载时间并节省带宽。 该库通过支持 srcset 和 picture 标签的响应式图像,以及 CSS 背景图像和动画 SVG 而脱颖而出。它在可用时与原生浏览器加载属性集成,同时为不支持的环境提供自定义回退。它还可以根据元素可见性触发特定 JavaScript 函数的执行。 广泛的功能包括前端资产管理,支持自定义滚动容器定位和针对异步注入元素的动态内容观察。该实用程序还通过资产加载错误处理来管理网络可靠性,并取消在完成前退出视口的元素的活动下载。
Uses the browser's native IntersectionObserver API to trigger asset loading when elements enter the viewport.
usehooks-ts is a comprehensive collection of reusable TypeScript-based hooks designed for managing state, DOM events, and browser API interactions within React applications. It provides a typed library of functions to handle common frontend patterns and side effects. The project distinguishes itself by offering specialized hooks for browser integration, including tools for interacting with the system clipboard, managing local and session storage persistence, and loading external scripts. It also includes utilities for responsive UI development, such as tracking media queries, window dimension
Integrates the Intersection Observer API to detect element visibility within the viewport.
该项目是一个 React 懒加载组件,旨在通过推迟子元素的渲染直到它们进入浏览器视口来提高前端性能。它作为一个资源生命周期管理器和可见性触发器,防止屏幕外组件的不必要挂载,从而减少初始页面加载时间和内存使用。 该库为可见性触发器提供了配置,允许使用自定义偏移量和特定滚动容器来确定组件何时加载。它包括管理组件生命周期的机制,可以选择组件在出现后是保持加载还是在离开视口时卸载。 其他功能涵盖通过使用占位符进行延迟渲染,以及优化滚动和调整大小监听器的事件处理。该系统还支持手动可见性验证,以强制进行视口检查或要求组件显示。
Implements the native IntersectionObserver API to detect when elements enter the viewport without polling.
react-lazyload 是一个 React 组件和视口可见性包装器,旨在通过推迟屏幕外 UI 元素的显示来最小化资源消耗。它作为一个前端性能优化器,延迟图像或组件的渲染,直到它们进入浏览器视口。 该库通过允许定义占位符尺寸来防止布局偏移,在内容懒加载时保持页面稳定性。它使用内部状态和可选动画管理从这些占位符到实际内容的过渡。 该系统提供了视口可见性检测机制、强制立即挂载的手动显示覆盖,以及在标准滚动或调整大小事件不足时使用的手动可见性触发器。
Uses the Intersection Observer API to detect when elements enter the viewport and trigger rendering.
react-intersection-observer 是 Intersection Observer API 的 React 实现,旨在跟踪 DOM 元素何时进入或离开浏览器视口。它提供了一个包装器和一组钩子,用于监控元素可见性并在内容对用户可见时触发回调。 该库包含一个 DOM 遮挡检测机制,以确定元素是否被其他组件覆盖或被 CSS 过滤器隐藏。它还具有一个 polyfill 包装器,为不支持 Intersection Observer 功能的浏览器提供可见性回退。 该项目涵盖了各种可见性跟踪功能,包括用于组件重新渲染的状态同步更新,以及无需更新状态即可执行回调的非渲染监控。这些工具支持实现无限滚动、资产懒加载和基于滚动的动画。
Provides a React implementation of the Intersection Observer API for viewport visibility tracking.
layzr.js 是一个 JavaScript 图像懒加载库,旨在通过延迟图像下载直到其进入浏览器视口来提高初始页面加载速度。它作为一个响应式图像选择器,根据浏览器支持和设备像素比识别最合适的图像源。 该库采用响应式图像交付系统,评估数据属性以选择最佳源。它包含一个动态内容跟踪机制,监控文档中新添加的图像,以确保它们自动添加到加载队列中。 该项目通过 Intersection Observer API 提供可见性跟踪,并包含一个强制手动视口刷新的实用工具。它还具有一个事件发射器,允许在图像源更新前后通过生命周期钩子执行自定义逻辑。
Implements the IntersectionObserver API to detect element visibility within the viewport and trigger source updates.
Splide 是一个与框架无关的 TypeScript 库,用于创建可访问的、支持触摸的内容轮播图和图片库。它提供了一个无依赖的滑块实现,支持在移动和桌面浏览器上进行拖动、滑动和轻弹交互。 该库通过使用 ARIA 角色和屏幕阅读器支持的全面可访问性层脱颖而出。它具有一个响应式断点系统,可根据屏幕宽度调整幻灯片尺寸和行为,并配有一个用于通过自定义组件和过渡效果扩展核心功能的插件系统。 该项目涵盖了广泛的布局和交互功能,包括网格排列、可变幻灯片尺寸和同步滑块工作流。它包括懒加载媒体和视口交叉监控等性能优化,以及通过键盘、鼠标滚轮或缩略图链接进行的多模态导航。 提供专用的包装包,用于集成到各种前端框架架构中。
Utilizes the IntersectionObserver API to trigger autoplay and media loading only when the carousel is visible.
Precedent 是一个 Next.js 应用程序启动器和组件库,提供了一套预配置的工具和原语,用于构建生产就绪的 Web 界面。它作为一个工具包,用于引导集成身份验证、分析和一系列自选 UI 组件的应用程序。 该项目的特色在于 Tailwind CSS UI 套件,它结合了无障碍原语和动画库来创建精致的界面。它包括一个服务器端图像生成器,用于在网络边缘以编程方式创建动态社交分享图像和预览视觉效果。 该库涵盖了广泛的功能,包括用于用户身份验证和会话管理的第三方身份集成、用于跟踪访问者指标的隐私优先网站分析,以及一系列用于管理客户端状态、本地存储和元素可见性的自定义 React Hook。它还提供了用于格式化文本和数字的实用程序。
Implements reusable utilities to track element visibility using intersection observers.
Autotrack 是一个用于 Google Analytics 的 JavaScript 库,可自动捕获用户交互和页面参与度。它提供了一个声明式分析实现系统,允许通过 HTML 属性跟踪 Web 事件,从而避免为每次交互编写自定义 JavaScript。 该项目包含一个分析包生成器,用于创建仅包含项目所需特定跟踪插件的最小化 JavaScript 文件。它还作为一个单页应用(SPA)跟踪器,监控浏览器历史记录的变化以记录虚拟页面浏览量。 该库涵盖了广泛的参与度衡量能力,包括跟踪滚动深度、元素可见性和媒体查询状态。它还提供了 Web 分析数据标准化工具,例如过滤 URL 参数和标准化路径以防止重复条目。
Uses the Intersection Observer API to detect when specific elements enter the viewport for impression tracking.
react-waypoint 是一个 React 组件和视口跟踪工具,根据 DOM 节点在可滚动区域内的可见性执行函数。它监控元素何时进入或离开浏览器视口或指定的滚动容器以触发回调。 该项目支持实现无限滚动、资源懒加载和滚动触发动画。它允许使用偏移量进行自定义滚动容器定义和视口边界配置,以确定事件触发的精确时机。 该工具为垂直和水平滚动提供元素位置跟踪和可见性监控。它包括触发灵敏度控制和事件节流,以管理快速滚动期间的回调执行。
Uses the IntersectionObserver API to asynchronously detect when elements enter or exit the viewport.
Fluid Player is a web-based media playback library designed to embed lightweight, responsive video players into websites. It supports standard video formats and adaptive streaming across modern browsers, providing a foundation for consistent media delivery and custom interface branding. The library distinguishes itself through integrated support for industry-standard advertising protocols, allowing for the injection and orchestration of linear and non-linear video advertisements. It includes built-in tracking for viewer engagement and performance metrics, ensuring that ad delivery is synchron
Uses the Intersection Observer API to monitor container visibility and trigger automatic transitions to a mini-player mode.