Tw-fade: pure CSS scroll-driven edge masking

Hacker News Top Tools

Summary

Tw-fade is a new Tailwind CSS plugin for pure CSS scroll-driven edge masking, providing elegant fade effects without JavaScript.

No content available
Original Article
View Cached Full Text

Cached at: 06/25/26, 05:12 PM

# tw-fade - Tailwind CSS scroll-edge fading Source: [https://pete.design/tw-fade](https://pete.design/tw-fade) Elegant, scroll\-driven edge masking\. One class\. Zero JavaScript\. By one of the creators of[tw\-shimmer](https://www.npmjs.com/package/tw-shimmer)CSS\-only shimmer effects, with 475k\+ weekly npm downloads\.\. `npm i tw\-fade` ## Horizontal`fade\-x` ## Vertical`fade\-y` this feed has a hard edge add fade\-y to the scroll area do i need another wrapper? no\. use the element that scrolls at the top, does the fade stay? no, the top fade clears and at the end? the bottom fade clears the newest message stays clear horizontal tabs too? use fade\-x on the rail can i make the fade wider? set a larger range top edge by itself? use fade\-t ## Advanced`fade\-xy fade\-size\-2xl fade\-range\-md` Peripheral impermanence Peripheral impermanence Peripheral impermanence Peripheral impermanence Peripheral impermanence Peripheral impermanence Peripheral impermanence Peripheral impermanence Peripheral impermanence Peripheral impermanence Peripheral impermanence Fade size2xlScroll range2xl ### Scroll aware Fades appear only when there is more content to scroll, then ease away again at either edge\. ### Eased gradients Eased alpha ramps dissolve content into the surface instead of ending on a clipped line\. ### Composable Axis, size, range, and clear\-zone utilities compose directly on the scroll container\. ## Works on any background DissolveRecedeSoftenVanishFadeBlurGhostDiffuseEclipseEbb

Similar Articles

CSS-Native Parallax Effect

Hacker News Top

A CSS-native parallax effect using scroll-driven animation timelines, providing a performant and simple utility class with no JavaScript.

Dithering with CSS

Hacker News Top

The article demonstrates how to apply dithering effects to images using CSS filters and SVG feTurbulence to maintain a consistent aesthetic.

Tailgrids 3.0

Product Hunt

Tailgrids 3.0 is an open-source React UI library designed for Tailwind CSS and AI workflows.

Tweaklify

Product Hunt

Tweaklify is a tool for fast DOM prototyping and live style editing.