npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-lazy-renderer

v1.2.1

Published

Lazily render Vue.js components for performance.

Downloads

1,325

Readme

vue-lazy-renderer

Lazily render Vue.js components for performance.

Feature

  • Speed. Use the Intersection Observer API (IO) to prevent performance problems.
  • Degrade Gracefully. If a user's browser doesn't support the IO, use getBoundingClientRect instead. (vue-lazy-renderer does not load the IO polyfill—it is too fat. You can load it by yourself.)
  • Lightweight. Only 3.7 kB minified.
  • Highly Customized. You can globally set several options and locally override them.

Installation

npm:

npm install vue-lazy-renderer

Yarn:

yarn add vue-lazy-renderer

Usage

Registration

Use a plugin to register a global component:

import VueLazyRenderer from 'vue-lazy-renderer';
import Vue from 'vue';

Vue.use(VueLazyRenderer);

Example

Customization

Options/Props

| Parameter | Description | Type | Default | |---|---|-|-| | tagName | The tag name of the root node of <lazy-renderer> | String | 'div' | | preLoad | The proportion of a pre-loading height or width to window.innerHeight or window.innerWidth | Number | 1.5 | | observerOptions | The Intersection Observer options | Object | { rootMargin: '0px 50% 50% 0px' } | | listenedEvents | The events you want window to listen for (used by getBoundingClientRect) | Array | ['scroll', 'resize', 'orientationChange'] | | throttledWait | The number of milliseconds to throttle invocations to | Number | 100 |

Events

| Name | Description | |-|-| | load | Start to load elements wrapped in <lazy-renderer> |

License

MIT