zzarcon / react-scroll-shadow

Pure CSS shadow to indicate more content in scrollable area

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-scroll-shadow Build Status

Pure CSS shadow to indicate more content in scrollable area

demo

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.

About

Pure CSS shadow to indicate more content in scrollable area

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

License:MIT License


Languages

Language:TypeScript 98.3%Language:HTML 1.7%