Gothic Framework G symbol

Link Component

This component uses an official htmx extension to emulate behavior similar to Next.js Link Component. It preloads the hx-get and href urls set into your html tags when the user hover the mouse over the component.

To create the same behavior, please add this script to your page headers:

< script defer  src="https://unpkg.com/htmx-ext-preload@2.0.1/preload.js" > </ script > 

Then add this tag to your body tag:

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

Now add preload="mouseover" to the components with href or hx-get to see the pre load happening when your mouse is over the component!

< li  hx-get="/my-route/to-be-preloaded" preload="mouseover" > 
	 < button > Link Component </ button > 
 </ li > 

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