# Scroll Fade

Utilities for adding a fade effect to the edges of a scroll container.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

<ComponentPreview name="scroll-fade-overflow" title="scroll-fade-overflow.tsx">
<Component />
</ComponentPreview>

Scroll fade adds a mask-image gradient to the edges of a scroll container so content dissolves into the background when there is more content beyond the visible area.

## Usage [#usage]

| Class | Styles |
| :-- | :-- |
| `scroll-fade` | Fade on both vertical edges, scroll-aware. |
| `scroll-fade-x` | Fade on both horizontal edges, scroll-aware. |
| `scroll-fade-t` | Fade on the top edge only. |
| `scroll-fade-b` | Fade on the bottom edge only. |
| `scroll-fade-l` | Fade on the left edge only. |
| `scroll-fade-r` | Fade on the right edge only. |
| `scroll-fade-s` | Fade on the logical start edge. |
| `scroll-fade-e` | Fade on the logical end edge. |
| `scroll-fade-none` | Remove the fade. |

## No Overflow, No Fade [#no-overflow-no-fade]

<ComponentPreview name="scroll-fade-overflow" title="scroll-fade-overflow.tsx">
<Component />
</ComponentPreview>

## Horizontal [#horizontal]

<ComponentPreview name="scroll-fade-horizontal" title="scroll-fade-horizontal.tsx">
<a />
</ComponentPreview>

## Edges [#edges]

<ComponentPreview name="scroll-fade-edge" title="scroll-fade-edge.tsx">
<o />
</ComponentPreview>

## Fade Size [#fade-size]

Use arbitrary value syntax `[--scroll-fade-size:1rem]` to change the fade depth.

<ComponentPreview name="scroll-fade-size" title="scroll-fade-size.tsx">
<p />
</ComponentPreview>

## Disable [#disable]

<ComponentPreview name="scroll-fade-none" title="scroll-fade-none.tsx">
<g />
</ComponentPreview>

## Fallback [#fallback]

Scroll-driven animations with static fallback for unsupported browsers.