npm install @emmgfx/scroll-hintScroll edge indicators for React — no listeners, no scroll events, just IntersectionObserver.
Uses IntersectionObserver on sentinel elements. No listeners, no polling, no jank.
Vertical, horizontal, or both — one prop controls all four edges.
Gradient shadow, solid line, or both — mix and match per your design.
Control colors and sizes. Accepts all standard div props.
Both shadowColor and lineColor accept any CSS value — including variables. Define a variable per color scheme and pass it as the prop.
Use Tailwind's dark: variant to define the variable inline — no extra stylesheet needed.
Scroll inside each container to see the shadows appear and disappear.
direction="vertical"defaultShadows appear on top and bottom edges as you scroll vertically.
All standard div props are forwarded to the outer wrapper.
| Prop | Type | Default | Description |
|---|---|---|---|
direction | "vertical" | "horizontal" | "both" | "vertical" | Which axes to observe and show shadows on. |
shadowColor | string | "rgba(0,0,0,0.15)" | CSS color for the gradient shadow. Set to "" to disable. |
shadowSize | number | 20 | Height/width of the shadow overlays in pixels. |
lineColor | string | undefined | CSS color for a solid line at the edge. Omit to disable. |
lineSize | number | 1 | Thickness of the solid line in pixels. |