views_lazy_renderer
5 sites
Security covered
Introduction
Views Lazy Renderer is a Drupal 10 / 11 module that enhances search and listing pages by rendering lightweight skeleton placeholders for entities in Views, then replacing them asynchronously with the full entity view mode as they scroll into view.
This approach improves page load performance, reduces render time, and integrates seamlessly with HTMX, leveraging Drupal’s built-in lazy-loading and partial rendering capabilities.
Features
- Adds a custom ViewsRow plugin (Lazy row) for skeleton placeholders.
- Supports nodes & media.
- Allows per-bundle configuration to control which view modes can be lazily rendered.
- Integrates with HTMX for partial page updates without requiring custom JavaScript.
- Supports alternating view modes and pager-aware lazy rendering.
- Fully cacheable, respecting entity and render metadata.
Use cases
- Search results pages using Search API.
- Large content listings where initial render performance is critical.
- Progressive enhancement of entity teasers with placeholders.
Requirements
- Drupal 10 / Drupal 11
- HTMX (included in core Drupal 11, install HTMX contrib module for Drupal 10)
- Search API for Search API Views integration.
Post-Installation
- Change your view to use the 'Lazy row' plugin
- Allow partial rendering in the bundle settings
- Optional: use the theme suggestions to change the skeletons for each bundle
Supporting this Module
If you find this module useful, consider contributing back by:
- Reporting issues or feature requests in the issue queue
- Submitting patches or merge requests
- Providing documentation or performance feedback