npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

z-proximity-engine

v2.5.7

Published

ِA high-performance proximity-based motion engine by Youssef Zidan for organic proximity-based UI.

Readme

🚀 ZProximity Engine

The Physics of Attraction for the Modern Web.

NPM Downloads NPM Version Bundle Size License

A high-performance React animation library for creating proximity-based interactions, magnetic cursor effects, and scroll-driven animations with GSAP. Perfect alternative to Framer Motion and React Spring for spatial interactions.

✨ Live Demo📦 NPM📖 Documentation🎮 Interactive Playground


🎯 Why ZProximity Engine?

Performance First

  • 120+ FPS: Runs at native refresh rates
  • 📦 10.7KB Core: Minimal bundle impact
  • 🚀 GSAP Powered: Industry-standard animation engine
  • 🎭 Zero Re-renders: Animations bypass React's render cycle

Developer Experience

  • 💪 TypeScript: Full type safety
  • 🎨 30+ Presets: Scale, magnetic, blur, cipher, and more
  • 🔗 Chainable: Combine unlimited effects with dash syntax
  • 📱 Mobile Optimized: Smart performance on touch devices

Use Cases

  • 🎯 Magnetic dock interfaces (macOS-style)
  • ✨ Interactive landing pages
  • 📜 Scroll-driven storytelling
  • 🎮 Game-like UI interactions
  • 🔮 Futuristic dashboard effects

📦 Installation

npm install z-proximity-engine gsap @gsap/react

Peer Dependencies

npm install react@^18.0.0 react-dom@^18.0.0 gsap@^3.15.0 @gsap/react@^2.1.2

🚀 Quick Start

1. Basic Hover Effect (3 lines)

import { Proximity } from 'z-proximity-engine';

export const HoverCards = () => (
  <Proximity preset="scale-blur" reach={2}>
    <div className="prox-item">Card 1</div>
    <div className="prox-item">Card 2</div>
    <div className="prox-item">Card 3</div>
  </Proximity>
);

2. Text Animations

import { ProximityText } from 'z-proximity-engine';

export const Hero = () => (
  <ProximityText 
    text="HOVER ME"
    preset="scale-opacity-cipher"
    splitBy="letter"
    reach={1.5}
  />
);

3. Scroll Reveal

export const Features = () => (
  <Proximity
    mode="scroll"
    preset="reveal-opacity"
    config={{
      scroll: { start: "top 90%", once: true },
      stagger: 0.2
    }}
  >
    <div className="prox-item">Feature 1</div>
    <div className="prox-item">Feature 2</div>
  </Proximity>
);

🎨 Animation Presets

Transform

scale | flexScale | x | y | rotate | skew

Appearance

opacity | blur | reveal | glow | brightness

Physics

magnetic | repel | tilt | tiltCard

Typography

weight | cipher | letterSpacing | color

Combine with Dash Syntax

preset="scale-blur-magnetic-opacity"

🏗️ Real-World Examples

macOS Dock Effect

<Proximity 
  nearestPreset="scale-magnetic" // Closest icon grows & pulls
  neighborPreset="repel"         // Others push away
  config={{ reach: 2.5, lockAxis: 'x' }}
>
  {icons.map(icon => (
    <div key={icon} className="prox-item dock-icon">
      {icon}
    </div>
  ))}
</Proximity>

Cipher Decryption

<ProximityText 
  text="CLASSIFIED"
  preset="cipher-scale"
  config={{ 
    cipher: [0, 1],  // Scrambled → Clear
    reach: 2 
  }}
/>

Magnetic Button

<Proximity preset="magnetic-scale" reach={1.5}>
  <button className="prox-item">Click Me</button>
</Proximity>

📊 Performance Benchmarks

| Metric | Value | |--------|-------| | Core Bundle Size | 10KB (gzipped) | | First Contentful Paint | < 1s | | Time to Interactive | < 1.5s | | Animation FPS | 120+ | | Supported Elements | 100+ simultaneous |


🔧 API Reference

Core Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | preset | string | - | Chain effects with dashes | | reach | number | 2 | Influence radius | | falloff | number | 2.4 | Curve steepness | | duration | number | 0.2 | Animation speed | | ease | string | "power1.out" | GSAP easing | | mode | "pointer" \| "scroll" | "pointer" | Trigger type |

📖 Full API Documentation


🌐 Browser Support

  • ✅ Chrome 90+
  • ✅ Firefox 88+
  • ✅ Safari 14+
  • ✅ Edge 90+
  • ✅ Mobile browsers (iOS Safari, Chrome Mobile)

🤝 Contributing

Contributions welcome! Please read our Contributing Guide.

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/amazing-preset)
  3. Commit your changes (git commit -m 'Add amazing preset')
  4. Push to the branch (git push origin feature/amazing-preset)
  5. Open a Pull Request

📝 License

MIT © Youssef Zidan


🔗 Links


🏆 Alternatives Comparison

| Feature | ZProximity | Framer Motion | React Spring | |---------|-----------|---------------|--------------| | Proximity Detection | ✅ Built-in | ❌ Manual | ❌ Manual | | Bundle Size | 10.7KB | ~50KB | ~15KB | | GSAP Integration | ✅ Native | ⚠️ Possible | ❌ No | | Scroll Animations | ✅ Built-in | ✅ Built-in | ⚠️ External | | TypeScript | ✅ Full | ✅ Full | ✅ Full | | Learning Curve | ⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |


Made with ⚡ by Youssef Zidan

If this library helped you, please ⭐ star the repo!


Keywords

react animation, proximity detection, magnetic cursor, hover effects, scroll animations, gsap react, motion design, interactive ui, spatial interactions, cursor effects, animation library, react gsap, framer motion alternative, react spring alternative, proximity-based animations, distance-based effects