Scroll Fade
Fade the edges of a scroll area, only on the sides where more content is hidden. No JavaScript.
scroll-fade scroll-fade-10Install
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.
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 bottom
scroll-fadeLists, menus, and panels.
- All files
- Designs
- Invoices
- Contracts
- Photos
- Videos
- Archive
Start and endscroll-fade-xChip rows and tab bars.
- Every edge
scroll-fade-xyCanvases 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-12Options
The modifier classes of the utility. Put them next to the scroll-fade class on the element that scrolls.
| Name | Kind | Default | Description |
|---|---|---|---|
scroll-fade · -x · -xy | class | — | Fade the top and bottom, the start and end, or all four edges. |
scroll-fade-<n> | class | 24px | The size of the fade: n steps of the spacing scale. |
scroll-fade-t · -b · -s · -e-<n> | class | the size | The size of one edge. A 0 turns that edge off. |
scroll-fade-inset-*-<n> | class | 0 | Keeps a sticky header or footer whole: the fade starts after it. |
scroll-fade-scroll-area | class | — | Reads the overflow of a Base UI Scroll Area instead of a scroll timeline. |
scroll-fade-none | class | — | Turns the fade off, for example at one breakpoint. |
- Hit Area
hit-areaGrow the touch target to 44px without moving the layout.
- Materials
material-brushed-aluminumMetal, glass, stone, and cloth surfaces that catch the light.
- Pattern
pattern-hatchHatch, dots, grid, and checker for empty or reserved areas.
- Shape
shape-zigzagCut the edges or corners of any box: zigzag, scallop, notch.
- Glow
glowA soft halo in the element's own color, for bars and lines.
- Typeset
typesetOne class styles the plain HTML of an article or a page.