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 πŸ™

Β© 2025 – Pkg Stats / Ryan Hefner

rn-fade-wrapper

v0.1.11

Published

πŸ”₯ Fade gradient wrapper for React Native scrollable views and overlays on iOS and Android.

Readme

React Native fade gradient wrapper

rn-fade-wrapper is a simple, highly-performant React Native component that adds smooth, customizable fade gradients to the edges of any content. Perfect for enhancing the user experience in scrollable containers, lists, carousels, modals, or any view with overflowing content.


✨ Features

  • ⚑ Native rendering for iOS and Android
  • πŸ” Supports vertical and horizontal gradient directions
  • 🎨 Fully customizable fade size and color (per side or uniform)
  • ↕️ Optional inward mode to fade towards content instead of outward
  • 🧩 Simple API: drop-in wrapper with intuitive props
  • πŸ’ͺ Great performance with low overhead β€” ideal for scroll views and animations

πŸ“¦ Installation

yarn add rn-fade-wrapper

or

npm install rn-fade-wrapper

Expo

This library works in Expo (with expo prebuild) without additional configuration.


πŸ“± Platform Support

| Platform | Old Arch | Fabric | |----------|----------|--------| | iOS | βœ… | βœ… | | Android | βœ… | βœ… |


πŸš€ Quick Start

import { FadeWrapper } from 'rn-fade-wrapper';

const MyComponent = () => {
  return (
    <FadeWrapper
      color="#ffffff"
      size={24}
      orientation="vertical"
    >
      <ScrollView>
        <Text>Fading edges example</Text>
      </ScrollView>
    </FadeWrapper>
  );
};

🧩 Props

| Prop | Type | Default | Description | |--------------|----------------------------|----------------------|-------------| | color | string | "#ffffff" | Fade color (can be any valid color string) | | size | number | 20 | Uniform fade size in points | | style | ViewStyle | {Β zIndex:Β 2Β } | Custom style applied to the wrapper view | | inward | boolean | false | Makes the gradient fade inward (towards the center) instead of outward | | sizes | { top?: number, right?: number, bottom?: number, left?: number } | undefined | Specific fade sizes per edge (overrides size and orientation) | | orientation| 'horizontal' \| 'vertical' | 'vertical' | Preset for direction: applies size to top/bottom or left/right | | children | React.ReactNode | β€” | Your wrapped content |

Note: sizes takes precedence over both size and orientation.


πŸŽ› Examples

🎯 Custom sides + inward fade:

<FadeWrapper
  color="black"
  inward
  sizes={{ top: 20, bottom: 30 }}
>
  <FlatList ... />
</FadeWrapper>

πŸ“œ Horizontal scroll fade:

<FadeWrapper
  color="rgba(0,0,0,0.5)"
  size={16}
  orientation="horizontal"
>
  <ScrollView horizontal>
    {/* content */}
  </ScrollView>
</FadeWrapper>

πŸ›  Under the Hood

  • iOS: Uses CAGradientLayer inside native UIView
  • Android: Draws LinearGradient on custom ViewGroup using Canvas
  • Handles layout and re-renders with platform-specific logic for consistency

πŸ’‘ UX Tip

Use rn-fade-wrapper to subtly indicate content overflow β€” especially in carousels, scroll views, and horizontal sliders. Gradients help hint to the user that there's more to scroll, improving engagement.


πŸ“˜ License

MIT β€” free to use, improve and contribute πŸŽ‰