Scroll both lists: rows that dissolve are an edge fade; a dark lip over solid rows is a scroll shadow
Scroll-Edge Fade (Scroll Shadow)
/ mask-image: linear-gradient(…) · .scrollEdgeEffectStyle(.soft, for: .top) /
also called scroll fade, scroll mask, overflow fade, fading edge (Android term), scroll edge effect (Apple term)
“List items that fade out at the top and bottom as you scroll” is a scroll-edge fade, made with a CSS mask (mask-image: linear-gradient); when the rows stay solid under a thin shadow instead, it is a scroll shadow. Both mean more is hidden past this edge, so each one disappears when the list reaches that end. Lists in iOS 26 and macOS 26 soften under the toolbar this way (SwiftUI calls it a scroll edge effect), and HeroUI ships the fade as ScrollShadow. It is not a marquee's edge fade, on a strip that moves by itself, nor the fade-out that cuts one line of text short.
If you called it…
…you meant Scroll-Edge Fade (Scroll Shadow).
Anatomy — every part, named
- 1Edge fade (mask)
mask-image: linear-gradient(…)“Where the list items dissolve instead of being cut off in a straight line” is an edge fade, a see-through gradient on the list itself, so it works over any background.
- 2Scroll shadow
background-attachment: local, scroll“The faint shadow along the top or bottom edge of a list” is a scroll shadow: the rows stay solid, and it leaves as soon as you reach that end.
Prompt — paste into your agent
Add a scroll-edge fade to the scrolling list: mask the scroll container with mask-image: linear-gradient(to bottom, transparent, black 32px, black calc(100% - 32px), transparent) so rows dissolve at the top and bottom edges over any background (HeroUI: ScrollShadow; SwiftUI: .scrollEdgeEffectStyle(.soft, for: .top)). Or use a scroll shadow: a thin soft shadow along each edge, with the rows left solid. Either one shows only while content is hidden past that edge: nothing at the top when the list is scrolled to the top.
Debug prompt — when it misbehaves
Paste this, then describe what you’re seeing — it hands your agent the classic failure modes to rule out first.
Debug my scroll-edge fade or scroll shadow (mask-image, linear-gradient, background-attachment: local, ScrollShadow, scrollEdgeEffectStyle). Rule out: the fade still showing at the very top or bottom because nothing reads the scroll position; a gradient overlay in one fixed color showing as a band over a patterned or changing background, where a mask would not; the overlay swallowing clicks on the last row because it lacks pointer-events: none; the mask also fading the scrollbar or a sticky header because it sits on the wrong element; -webkit-mask-image missing for older Safari; the pure CSS shadow hidden behind rows that have their own opaque background; the fade so short or faint that it reads as a rendering glitch. The symptom:
In code
The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).
| CSS | mask-image: linear-gradient(…) | fades the rows themselves, over any background |
| SwiftUI | .scrollEdgeEffectStyle(.soft, for: .top) | macOS 26+ and iOS 26+ |
| HeroUI | <ScrollShadow> | the fades come and go as you scroll |
| CSS | background-attachment: local, scroll | the pure CSS shadow that hides itself at each end |