astro-hover-prefetch

1.0.7 • Public • Published

🚀  Astro — URLs prefetching on hover

NPM Downloads ISC License PRs Welcome
Astro TypeScript Prettier EditorConfig ESLint

This component capture mouse hovering on links with internal URLs.
Then, it will prefetch the HTML document beforehand.

The goal is to make further page loading snappier.
It's useful with SSG but also with SSR in certain scenarios.

It plays well with this page transition component:
astro-page-transition

📦  Installation

pnpm i astro-hover-prefetch

🛠  Usage

---
import { HoverPrefetch } from 'astro-hover-prefetch';
// ...
---
<!-- ... -->
<head>
  <!-- Place component inside `HEAD` tag -->

  <!-- 'max' property is optional -->
  <HoverPrefetch max={8} />

  <!-- ... -->
</head>

Package Sidebar

Install

npm i astro-hover-prefetch

Weekly Downloads

6

Version

1.0.7

License

ISC

Unpacked Size

11.7 kB

Total Files

7

Last publish

Collaborators

  • julian.cataldo