pixels have gravity
Target prediction for React & Next.jsKnow the target
Know the target
before the click.
Achieve a 1.37 fetch:click ratio. Intent-link computes probability using kinetic and potential energy from motion velocity and distance.
$ npm install intent-link
npmv1.0.13licenseMITreact≥18next≥13
01 / applications
One signal. Many uses.
// analytics
Intent, not just clicks
Log abandoned approaches and hesitation, not only actions.
// disclosure
Progressive reveal
Open a preview or tooltip the instant a user heads toward it.
// performance
Prefetch Links
Prefetch navigation links before the user clicks them.
// adaptive UI
Assistive targeting
Enlarge targets or bring them closer as the user approaches them.
01
01
Measure
the noisy trajectory
02
02
Estimate
the likely endpoint
03
03
Prepare
before arrival
02 / live demo
Move toward a tile and watch it prefetch.
importance
cost
onIntent stream0 fired
// move toward a tile to fire a signal…
product shot
Women
product shot
Men
product shot
Kids
product shot
Shoes
product shot
Bags
product shot
Accessories
product shot
Sport
product shot
Denim
product shot
Outerwear
product shot
Beauty
product shot
Home
product shot
Sale
product shot
Electronics
product shot
Watches
product shot
Jewelry
product shot
Furniture
product shot
Gifts
product shot
Travel
03 / feel the difference
Same click. Skip the wait.
One page waits for the network request while the other is fetched during user trajectory.
time saved this session
0 ms
/product/quilted-jacket
/product/quilted-jacket
04 / why it's different
Not visibility. Not hover. Intent.
Every other approach is either late or wasteful.
1.37
Fetch:Click ratio
useIntentTarget
Build custom components
React · Next
For the most popular framework
MIT
Open source, no data collection
| Approach | intent-link | ForesightJS | instant.page | Next.js prefetch | Guess.js |
|---|---|---|---|---|---|
| Timing | before arrival | on trajectory | on hover | on viewport | precomputed |
| Selectivity | the target | the target | one | all visible | top guesses |