Scroll Shadow
Import
Usage
Long Content
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Examples
Hide Scrollbar
Hide the scrollbar while maintaining scroll functionality and shadow indicators.
Horizontal Scroll
Use horizontal orientation for side-to-side scrolling content.
Custom Shadow Size
Adjust the shadow dimension beyond the default 40px.
Larger Shadow
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
This scroll shadow has a larger size of 80px, making the gradient effect more prominent and visible.
With Offset
Set a scroll position threshold before shadows appear.
Shadow with Offset
Scroll down at least 20px before the shadows appear.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
The shadows will only appear after scrolling past the 20px offset threshold.
Visibility Change Callback
React to shadow visibility changes with a callback function.
Visibility Tracking
Check the console to see visibility changes as you scroll.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
Scroll to see the visibility state change in the console.
ScrollShadow Props
| Attribute | Type | Default | Description |
|---|---|---|---|
| size | number | 40 | Shadow dimension in pixels |
| offset | number | 0 | Scroll position threshold before shadow appears |
| hideScrollBar | boolean | false | Conceals scrollbar visibility |
| orientation | 'horizontal' | 'vertical' | 'vertical' | Scroll direction |
| isEnabled | boolean | true | Activates shadow functionality |
| visibility | ScrollShadowVisibility | 'auto' | Controls shadow display state: 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'both' | 'none' |
| onVisibilityChange | (visibility: ScrollShadowVisibility) => void | - | Callback function triggered when shadow visibility changes |
| className | string | - | Additional CSS classes for styling |
| children | React.ReactNode | - | The content to be displayed with scroll shadows |

