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

framer-motion-helper

v1.0.4

Published

A utility library for simplifying Framer Motion animations in React.

Readme

framer-motion-helper

framer-motion-helper is a utility library designed to simplify animations using Framer Motion in React applications. It provides reusable components, hooks, and utilities to speed up the animation process and enhance developer productivity.

🚀 Installation

Install the package using npm or yarn:

npm install framer-motion-helper

Or:

yarn add framer-motion-helper

🟩 Features

Components

  • Fade: Quickly add fade-in/out animations to any element.
  • Slide: Create sliding animations in various directions (left, right, up, down).
  • StaggerContainer: Animate child elements with staggered delays.

Hooks

  • useParallaxScroll: Create parallax effects based on scroll progress.
  • useViewportProgress: Track how far an element has entered the viewport.

Utilities

  • combineAnimations: Merge multiple animation variants into one.
  • saveAnimationTemplate: Save animation configurations to local storage.
  • loadAnimationTemplate: Load saved animations from local storage.

Context

  • AnimationConfigProvider: Manage global animation configurations like duration and easing.

Responsive Animations

Handle animations dynamically based on screen sizes.

🖥️ Usage

Basic Example: Fade Animation

import { Fade } from 'framer-motion-helper';

function App() {
  return (
    <Fade duration={0.8}>
      <h1>Hello, World!</h1>
    </Fade>
  );
}

export default App;

Slide Animation

import { Slide } from 'framer-motion-helper';

function App() {
  return (
    <Slide direction="left" distance={200}>
      <p>Sliding in from the left!</p>
    </Slide>
  );
}

export default App;

Staggered Animations

import { StaggerContainer, Slide } from 'framer-motion-helper';

function App() {
  return (
    <StaggerContainer stagger={0.3}>
      <Slide>Item 1</Slide>
      <Slide>Item 2</Slide>
      <Slide>Item 3</Slide>
    </StaggerContainer>
  );
}

export default App;

Parallax Effect

import { useParallaxScroll } from 'framer-motion-helper';

function ParallaxComponent() {
  const y = useParallaxScroll(0, 0.5, 200);

  return <motion.div style={{ y }}>Parallax Content</motion.div>;
}

Global Configuration

import { AnimationConfigProvider, Fade } from 'framer-motion-helper';

function App() {
  const config = { duration: 1, easing: "easeInOut" };

  return (
    <AnimationConfigProvider config={config}>
      <Fade>
        <h1>Configured Animation</h1>
      </Fade>
    </AnimationConfigProvider>
  );
}

export default App;

🤖 API Reference

Components

Fade

  • Prop: duration (number) - Duration of the fade animation. Default is 0.5.
  • Prop: delay (number) - Delay before the animation. Default is 0.

Slide

  • Prop: direction (string) - Direction of the slide (left, right, up, down). Default is left.
  • Prop: distance (number) - Distance to slide the element. Default is 100.
  • Prop: duration (number) - Duration of the slide animation. Default is 0.5.

StaggerContainer

  • Prop: stagger (number) - Time delay between animations of children. Default is 0.2.

Hooks

useParallaxScroll

  • Parameter: start (number) - Start scroll position for the effect. Default is 0.
  • Parameter: end (number) - End scroll position for the effect. Default is 1.
  • Parameter: offset (number) - Maximum offset for the parallax motion. Default is 50.

useViewportProgress

  • Parameter: ref (Ref) - A React ref to track viewport progress.

Contributors ✨

License

This package is licensed under the MIT License. See the LICENSE file for more details.