Gothic Framework G symbol

Link Component

The preload feature emulates the Next.js Link Component: it preloads the hx-get and href URLs on your HTML tags the moment the user hovers the mouse over the element, so the next page is already in flight before the click.

preload is built into the Gothic core — the same Go/WASM runtime that ships htmx. There is no script to add and no CDN to reach; the extension is already there. You opt in with two attributes.

First, turn the extension on for a subtree by adding hx-ext="preload" to your body tag (or any ancestor):

<body hx-ext="preload">
</body>

Then add preload="mouseover" to any element that carries an href or hx-get and it warms on hover:

<a href="/my-route/to-be-preloaded" preload="mouseover">
	<button>Link Component</button>
</a>

Did you like this Next.js-like feature? Check out other components as well! Click the button below to explore more features!