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

scroll-hooks

v1.0.0

Published

React hooks for scroll-triggered animations: fade in, count up, clip-path reveal.

Readme

React Hooks로 스크롤 애니메이션 구현하기 A tiny set of React hooks for scroll-triggered animations — fade in, count up, clip-path reveal.

Demo

ScreenShot

Install

npm install scroll-hooks
# or
yarn add scroll-hooks
# or
pnpm add scroll-hooks

react@^16.8.0 || ^17 || ^18 || ^19 is a peer dependency.

Hooks

useScrollFadeIn

useScrollFadeIn

스크롤 시 특정 방향에서 Fade In 하면서 나오는 애니메이션.

import { useScrollFadeIn } from 'scroll-hooks';

function Hero() {
  const animatedItem = useScrollFadeIn('up', 1, 0);
  return <div {...animatedItem}>Hello</div>;
}

| Param | Type | Default | Description | |---|---|---|---| | direction | 'up' \| 'down' \| 'left' \| 'right' | 'up' | 엘리먼트가 나오는 방향 | | duration | number | 1 | 애니메이션 시간 (초) | | delay | number | 0 | 애니메이션 지연 (초) |

useScrollCount

useScrollCount

스크롤 시 정해놓은 값까지 카운트하는 애니메이션. 카운트다운(end < start)도 지원합니다.

import { useScrollCount } from 'scroll-hooks';

function Stats() {
  const counter = useScrollCount(630);
  return <span {...counter}>0</span>;
}

| Param | Type | Default | Description | |---|---|---|---| | end | number | — | 카운트가 끝나는 숫자 (필수) | | start | number | 0 | 카운트가 시작하는 숫자 | | duration | number | 3 | 애니메이션 시간 (초) |

useScrollClipPath

useScrollClipPath

스크롤 시 특정 방향으로 펼쳐지는 애니메이션. 부모 노드를 기준으로 동작하므로 컨테이너 안에 감싸서 사용하세요.

import { useScrollClipPath } from 'scroll-hooks';

function Banner() {
  const animatedItem = useScrollClipPath('left', 1, 0);
  return (
    <div className="container">
      <img {...animatedItem} src="/hero.jpg" alt="" />
    </div>
  );
}

| Param | Type | Default | Description | |---|---|---|---| | direction | 'up' \| 'down' \| 'left' \| 'right' | 'left' | 펼쳐지는 방향 | | duration | number | 1 | 애니메이션 시간 (초) | | delay | number | 0 | 애니메이션 지연 (초) |

TypeScript

타입 정의는 패키지에 포함되어 있어 별도 설치가 필요하지 않습니다. 모든 hook은 generic으로 element 타입을 받을 수 있습니다.

import { useScrollFadeIn } from 'scroll-hooks';

const heading = useScrollFadeIn<HTMLHeadingElement>('up', 1, 0);

Local development

git clone https://github.com/jus0k/scroll-hooks.git
cd scroll-hooks
npm install
npm run build

cd example
npm install
npm start

Author

👤 Jusung Kim

  • Website: https://jusungkim.kr/
  • Github: @jus0k

Show your support

Give a ⭐️ if this project helped you!

License

MIT © Jusung Kim