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

@freepina/react-native-parallax-reanimated

v0.1.9

Published

dd

Readme

@freepina/react-native-parallax-reanimated

Various scroll-driven parallax effects for React Native with Reanimated. Inspired by parallax-controller and react-scroll-parallax

Also supports NativeWind if installed on your project

Installation

npm install @freepina/react-native-parallax-reanimated

Usage

Wrap components with ParallaxControllerProvider first

import {ParallaxControllerProvider} from '@freepina/react-native-parallax-reanimated'

<ParallaxControllerProvider>
    <App />
</ParallaxControllerProvider>

Normal use (animated views inside a Animated.Scrollview)

import {useParallaxController, Parallax, ParallaxBanner} from '@freepina/react-native-parallax-reanimated'

const {attachScroll, handleContainerLayout} = useParallaxController();
<Animated.ScrollView ref={attachScroll} onLayout={handleContainerLayout} >
    <Parallax speed={10} style={{width: '100%', height: '60'}}> //View translates in parallax vertically depending on speed
    <Parallax transform={[{rotate: ['0deg','360deg']}, {translateX: [-100, 100]}, {opacity: [1, 0]}]} style={{width: '100%', height: '60'}}> //add custom transforms
    //note speed and transform are mutually exclusive (using both won't cause error but will result in unexpected behavior)
    <ParallaxBanner source={asset} style={{width: '100%', height: '60'}} speed={10}> //A banner with parallax effect
    <ParallaxBanner source={asset} style={{width: '100%', height: '60'}} imageProps={{style: {resizeMode: 'repeat'}}} speed={10}> //custom prop for internal react-native Image element, note that source is outside of imageProps
</Animated.ScrollView>
// ...

Use with targeted element - components outside scrollview can be animated based on scroll position of the target element inside scrollview

const target = useRef<any>(null);
const {attachScroll, handleContainerLayout, handleTargetLayout, registerTarget} = useParallaxController();
<Parallax className='absolute top-2 right-2 bg-pink-600 size-32 z-10' transform={[{rotate: ['0deg', '90deg']}, {opacity: [1, 0]}]} targetElement={target}/>
<Animated.ScrollView ref={attachScroll} onLayout={handleContainerLayout} >
    <View className={`${isLarge ? 'h-96' : 'h-48'} bg-foreground`} ref={(node) => {target.current = node; registerTarget(target);}} onLayout={handleTargetLayout}/> //we use a callback function for ref prop, to assign the element to ref and to register it in the controller
</Animated.ScrollView>

then the parallax element spins and fades along the scroll progress of the registered view component.

Use with normal ScrollView

const target = useRef<any>(null);
const {attachScroll, handleContainerLayout, handleTargetLayout, registerTarget} = useParallaxController();
<Parallax className='absolute top-2 right-2 bg-pink-600 size-32 z-10' transform={[{rotate: ['0deg', '90deg']}, {opacity: [1, 0]}]} targetElement={target}/>
<ScrollView ref={attachScroll} onLayout={handleContainerLayout} >
    <View className={`${isLarge ? 'h-96' : 'h-48'} bg-foreground`} ref={(node) => {target.current = node; registerTarget(target);}} onLayout={handleTargetLayout}/> //we use a callback function for ref prop, to assign the element to ref and to register it in the controller
</ScrollView>

Use with @shopify/flash-list - you need to extract the internal scrollview ref, not flashlist itself

//recyclerlistview_unsafe is an undocumented function thing for internal recyclerlistview
<FlashList
            data={filteredData}
            ref={node => attachScroll(node?.recyclerlistview_unsafe?.getNativeScrollRef())}

            onLayout={handleContainerLayout}

            />

Supported Transforms

Same as react-scroll-parallax, only supports transform styling (translate, rotate, scale, etc) and opacity

NativeWind Support

You need to modify the tailwind.config.js file in your project to include this package.

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    //... some other paths
    './node_modules/@freepina/react-native-parallax-reanimated/src/*.{js,jsx,ts,tsx}'
  ],
  //... other config stuff
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library