Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

zzarcon/react-scroll-shadow

Repository files navigation

react-scroll-shadow Build Status

Pure CSS shadow to indicate more content in scrollable area

Demo 🍿

https://zzarcon.github.io/react-scroll-shadow

Install πŸš€

$ yarn add react-scroll-shadow

Usage ⛏

Basic

import ScrollShadow from 'react-scroll-shadow';
<ScrollShadow>
 Content
</ScrollShadow>

Custom

import ScrollShadow from 'react-scroll-shadow';
<ScrollShadow
 bottomShadowColors={{
 active: 'red',
 inactive: 'white'
 }}
 topShadowColors={{
 active: 'blue',
 inactive: 'white'
 }}
 shadowSize={2}
>
 Content
</ScrollShadow>

Api πŸ“š

interface ShadowColors {
 inactive: string;
 active: string;
}
interface Props {
 height?: string;
 bottomShadowColors?: ShadowColors;
 topShadowColors?: ShadowColors;
 shadowSize?: number;
}

See example/ for full example.

Packages

No packages published

Contributors 3

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /