ScrollFade
A gradient fade overlay for scroll containers. Place inside a relatively positioned container to indicate more content.
Calacatta Gold marble
Reclaimed oak plank
Brushed stainless steel
Terracotta hex tile
Sage linen weave
Board-formed concrete
Honed basalt
Cane webbing
Usage
import { ScrollFade, ScrollFadeProps } from "@desk/ui/components/scroll-fade";Best practices
Drop
ScrollFadeinside aposition: relativescroll container instead of hand-writing a gradient — it renders the masked scrim for you (it'saria-hidden, purely decorative).Match
themeto the container's actual background (card/popover/…) — the scrim fades to that colour, so a mismatch leaves a visible seam.Set
position(start/end) andorientationto the edge with hidden content —end+verticalis the common "more below" bottom fade.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| size | "base" | "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "base" | Thickness of the fade gradient — height when vertical, width when horizontal. |
| position | "end" | "start" | null | undefined | Position/direction of the fade - start: top for vertical, left for horizontal - end: bottom for vertical, right for horizontal | |
| orientation | "horizontal" | "vertical" | null | undefined | Orientation of the gradient | |
| theme | "popover" | "muted" | "background" | "card" | "gray" | null | undefined | Background theme the gradient fades to |
Also exports
- interface
ScrollFadeProps
Composition
Used by