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

@manufosela/hero-scroll-animation

v1.1.0

Published

Hero section with scroll-driven parallax animation and image reveal

Readme

@manufosela/hero-scroll-animation

npm version License: MIT

Hero section with scroll-driven parallax animation built with Lit 3.

As the user scrolls, the hero content fades out and slides up while a center image rises and side images slide in from the edges. On mobile, the animation is triggered by an intersection observer instead of continuous scroll tracking.

Installation

npm install @manufosela/hero-scroll-animation

Usage

import '@manufosela/hero-scroll-animation';
<hero-scroll-animation>
  <img slot="background" src="bg.jpg" />
  <img slot="center" src="center.png" />
  <img slot="left" src="left.png" />
  <img slot="right" src="right.png" />
  <div slot="content">
    <h1>Hero Title</h1>
    <p>Subtitle text</p>
  </div>
</hero-scroll-animation>

Attributes

| Attribute | Type | Default | Description | |-----------|------|---------|-------------| | background-text | String | '' | Large decorative text behind the images | | scroll-height | Number | 450 | Scroll distance in vh for the parallax effect | | overlay-opacity | Number | 0.5 | Opacity of the dark overlay (0-1) | | scrub | Number | 1 | Smoothing factor for scroll interpolation | | mobile-breakpoint | Number | 768 | Viewport width (px) below which mobile mode activates | | mobile-scroll-height | Number | 220 | Scroll distance in vh for mobile mode |

Slots

| Slot | Description | |------|-------------| | content | Main content (headings, text, CTAs) displayed over the hero | | background | Hidden <img> whose src is used as the background image | | center | Hidden <img> whose src is used for the center parallax image | | left | Hidden <img> whose src is used for the left side image | | right | Hidden <img> whose src is used for the right side image |

CSS Custom Properties

| Property | Default | Description | |----------|---------|-------------| | --hero-accent-color | #bfa15f | Accent color for decorative elements | | --hero-text-color | #f0f0f0 | Default text color inside the hero | | --hero-bg-gradient-start | #d4af37 | Start color for the background text gradient | | --hero-bg-gradient-end | #f4e4b0 | End color for the background text gradient |

Examples

With background text

<hero-scroll-animation background-text="PREMIUM">
  <img slot="background" src="bg.jpg" />
  <img slot="center" src="center.png" />
  <div slot="content">
    <h1>Premium Collection</h1>
  </div>
</hero-scroll-animation>

Custom overlay and scroll distance

<hero-scroll-animation overlay-opacity="0.7" scroll-height="350">
  <img slot="background" src="bg.jpg" />
  <img slot="center" src="center.png" />
  <img slot="left" src="left.png" />
  <img slot="right" src="right.png" />
  <div slot="content">
    <h1>Dark Hero</h1>
  </div>
</hero-scroll-animation>

Custom gradient colors

<hero-scroll-animation
  background-text="EXPLORE"
  style="
    --hero-bg-gradient-start: #e63946;
    --hero-bg-gradient-end: #f4a261;
  "
>
  <img slot="background" src="bg.jpg" />
  <img slot="center" src="center.png" />
  <div slot="content">
    <h1>Explore</h1>
  </div>
</hero-scroll-animation>

License

MIT