Components/EdgeFadeMask
Universal Component

EdgeFadeMask

Add edge fade with `mask-image` to avoid hard clipping in scroll containers.

This page was migrated by AI, please review carefully

Migration is complete, but please validate against source code and manual review.

EdgeFadeMask

Add edge fade with mask-image to avoid hard clipping in scroll containers.

Basic Usage (Vertical)

Vertical fade

Demo loads on client.

Horizontal Scrolling

Horizontal fade

Demo loads on client.

API

Props

PropTypeDefaultDescription
asstring'div'Root tag
axis'vertical' | 'horizontal''vertical'Fade direction
sizestring | number24One-side fade distance
thresholdnumber1Scroll-edge threshold in px
disabledbooleanfalseDisable fade effect
observeResizebooleantrueRecompute when container size changes

Tips

  • Keep border/radius styles on the wrapper; TxEdgeFadeMask handles scroll and mask.
  • For horizontal mode, prefer inner content with display: flex and width: max-content.
Was this helpful?