Socket
Book a DemoInstallSign in
Socket

@ts-pro/vue-eternal-loading

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ts-pro/vue-eternal-loading

Infinity loading component vue3 projects. Slava Ukraini!

1.3.1
latest
Source
npmnpm
Version published
Weekly downloads
2.6K
13.07%
Maintainers
1
Weekly downloads
 
Created
Source

🇺🇦 vue-eternal-loading Build Status

The Infinity loading component is written in TypeScript for Vue 3. No dependencies.

Features:

  • 4 directional ( top / left / right / bottom)
  • 4 loading states ( loading / no-more / no-results / error )
  • Custom markup & styles
  • Works in browsers & bundlers
  • SSR friendly

Installation:

Yarn

yarn add @ts-pro/vue-eternal-loading

Npm

npm install @ts-pro/vue-eternal-loading

Browser

<head>
    <!-- Vue 3 must be loaded before `vue-eternal-loading` -->
    <script src="https://cdn.jsdelivr.net/gh/ts-pro/vue-eternal-loading/dist/vue-eternal-loading.umd.js"></script>
</head>

Simple usage:

<VueEternalLoading :load="load"></VueEternalLoading>
const PAGE_SIZE = 5;

// We need to pass this method to the component,
// and it will be called automatically when needed.
async function load({ loaded }) {
  // Load your data from the server or any other source.
  const loadedItems = await loadItems(page);
  items.value.push(...loadedItems);
  page += 1;
  // Call the `loaded` callback with 2 arguments:
  // 1. The number of items we have loaded
  // 2. Our page size to know when we have reached the end
  loaded(loadedItems.length, PAGE_SIZE);
}

Guide & demo:

Check out our vue-eternal-loading docs

Releases

List releases vue-eternal-loading releases

Vue2 support

Our component is specifically designed for Vue 3. If you are looking for a solution for Vue 2, you can check out this library vue-infinite-loading.

Issue

Please feel free to create an issue or submit a feature request vue-eternal-loading issues

License

MIT License

Keywords

vue

FAQs

Package last updated on 29 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.