Skip to content
Gelatin UIAlpha

Scroll Fade

Free

Fade the edges of a scroll area, only on the sides where more content is hidden. No JavaScript.

Tailwind CSS 4MIT + Commons Clause · 1 CSS file · 0 KB JavaScript
Inbox
  • Mara Okafor

    Q4 roadmap draft

    09:41
  • Kenji Sato

    Re: Pricing page copy

    09:12
  • Polar

    Your payout is on the way

    08:30
  • Lena Fischer

    Design review notes

    Yesterday
  • GitHub

    3 new pull request reviews

    Yesterday
  • Arjun Mehta

    Launch week schedule

    Mon
  • Sara Lindqvist

    Photos from the offsite

    Mon
  • Cloudflare

    Weekly traffic report

    Sun
  • Iva Horvat

    Contract for the new studio

    Sat

Scroll the list: each edge fades only when more is hidden there.

LightDark
61016
OnOff
scroll-fade scroll-fade-10

Install

Add the utility's CSS with the CLI, your coding agent, or by hand. It has no JavaScript.

Usage

Put the class on the element that scrolls. Each edge fades only while more content is hidden past it.

inbox.tsx

Directions

Put the class on the scroller. The fade grows in as content scrolls under an edge, with scroll-driven animation and no JavaScript.

  • Top and bottomscroll-fade

    Lists, menus, and panels.

    • All files
    • Designs
    • Invoices
    • Contracts
    • Photos
    • Videos
    • Archive
    Start and endscroll-fade-x

    Chip rows and tab bars.

  • Every edgescroll-fade-xy

    Canvases and boards that pan.

One edge

Set the size of one edge with -t, -b, -s, or -e. A 0 turns that edge off.

  • Q4 roadmap draft
  • Re: Pricing page copy
  • Your payout is on the way
  • Design review notes
  • 3 new pull request reviews
  • Launch week schedule
  • Photos from the offsite
  • Weekly traffic report
  • Contract for the new studio
scroll-fade scroll-fade-t-0 scroll-fade-b-12

Options

The modifier classes of the utility. Put them next to the scroll-fade class on the element that scrolls.

NameKindDefaultDescription
scroll-fade · -x · -xyclass—Fade the top and bottom, the start and end, or all four edges.
scroll-fade-<n>class24pxThe size of the fade: n steps of the spacing scale.
scroll-fade-t · -b · -s · -e-<n>classthe sizeThe size of one edge. A 0 turns that edge off.
scroll-fade-inset-*-<n>class0Keeps a sticky header or footer whole: the fade starts after it.
scroll-fade-scroll-areaclass—Reads the overflow of a Base UI Scroll Area instead of a scroll timeline.
scroll-fade-noneclass—Turns the fade off, for example at one breakpoint.