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

svelte-parallax-plus

v0.2.1

Published

A small parallax scrolling library for Svelte 5

Readme

Svelte Parallax Plus

A small libraray to support parallax scrolling for Svelte 5

Heavily inspired by svelte-parallax. This project is a complete rewrite of svelte-parallax to work with modern Svelte and typescript.

Try out the Demo!

Installing

npm

npm i svelte-parallax-plus

pnpm

pnpm add svelte-parallax-plus

Basic Usage

Below is a quickstart template

<script>
  import { Parallax, ParallaxLayer } from 'svelte-parallax-plus';
</script>

<Parallax stiffness={0.1} damping={0.2}>
  <ParallaxLayer scrollSpeed={0} class="bg-layer">
    <div style="background: #ccf"></div>
  </ParallaxLayer>

  <ParallaxLayer scrollSpeed={0.1}>
    <img
      style="filter: blur(4px);"
      src="Background.png"
      alt="A background with a house and barn" />
  </ParallaxLayer>

  <ParallaxLayer
    scale={0.6}
    offsetX={-0.35}
    offsetY={1.6}
    scrollSpeed={0.2}>
    <img
      src="Subject.png"
      alt="A woman wearing a hat walking down a path" />
  </ParallaxLayer>

  <ParallaxLayer
    scrollSpeed={0.4}>
    <img
      style="filter: blur(2px);"
      src="Foreground.png"
      alt="A bush in the foreground" />
  </ParallaxLayer>
</Parallax>

API

Parallax

The parallax container provides context information (like height and scroll position) to each parallax layer.

| | | | | | --------- | ------------ | ---------------------------------------------------------------------------------------- | ------------- | | Prop | Type | Description | Default Value | | stiffness | number [0-1] | [Optional] The stiffness of the spring. Lower values are more elastic. | 0.1 | | damping | number [0-1] | [Optional] How much damping the spring recieves. | 0.3 | | height | number | [Optional] How many pixels should the container be. Auto calculated when left undefined. | | | disabled | bolean | If disabled the scrolling effect stops. | |

Example: Elastic scrolling

<Parallax stiffness={0.1} damping={0.1}>
  <ParallaxLayer scrollSpeed={0.5}>
    ...
  </ParallaxLayer>
</Parallax>

Parallax Layer

The parallax layer shifts its content based on information provided by the parallax container and its config.

| | | | | | --------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------ | ------------- | | Prop | Type | Description | Default Value | | scrollSpeed | number | How fast the layer scrolls compared to the parent container. 0 is the same speed. Can be negative. | 0 | | scrollDirection | number [0-2] | [Optional] The direction that the scrolls. Represented as a multiple of PI. 0: right, 0.5: up, 1: left, 1.5: down. | 1.5 | | bindingBox | [number, number] | [Optional] The thresholds where the scrolling effect triggers. | [-1, 1] | | offsetX | number | The X offset of the layer as a ratio of the container's width. | 0 | | offsetY | number | The Y offset of the layer as a ratio of the container's height. | 0 | | scale | number | The scale of the layer. | 1 |

Example: Setting scroll behavior with runes

<script lang="ts">
  ...

  let stopScroll = $state<boolean>(false);
</script>
<Parallax disabled={stopScroll}>
  <ParallaxLayer scrollSpeed={0.5}>
    ...
  </ParallaxLayer>
</Parallax>