Scroll Fade Effect
lyminhnghia/scroll-fade-effectFreeComponent
Fade content edges as you scroll, for both vertical and horizontal layouts.
Install it
npx shadcn@latest add https://lyminhnghia.github.io/r/scroll-fade-effect.jsonSource
1import type { ComponentProps } from "react"23import { cn } from "@/lib/utils"45export type ScrollFadeEffectProps = ComponentProps<"div"> & {6 /**7 * Scroll direction to apply the fade effect.8 * @defaultValue "vertical"9 * */10 orientation?: "horizontal" | "vertical"11}1213export function ScrollFadeEffect({14 className,15 orientation = "vertical",16 ...props17}: ScrollFadeEffectProps) {18 return (19 <div20 data-orientation={orientation}21 className={cn(22 "data-[orientation=horizontal]:overflow-x-auto data-vertical:overflow-y-auto",23 "data-[orientation=horizontal]:scroll-fade-effect-x data-vertical:scroll-fade-effect-y",24 className25 )}26 {...props}27 />28 )29}
Files it writes
More from lyminhnghia
All 26 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Apple Hello Effectapple-hello-effect | lyminhnghia | Components | Free | 1 dep | |
| chevrons-up-down-iconchevrons-up-down-icon | lyminhnghia | Components | Free | no deps | |
| Code Block Commandcode-block-command | lyminhnghia | Components | Free | 4 deps · 3 files | |
| Consent Managerconsent-manager | lyminhnghia | Components | Free | 1 dep | |
| Copy Buttoncopy-button | lyminhnghia | Components | Free | 2 deps · 2 files | |
| GitHub Starsgithub-stars | lyminhnghia | Components | Free | no deps | |
| Shimmering Textshimmering-text | lyminhnghia | Components | Free | 1 dep | |
| Slide to Unlockslide-to-unlock | lyminhnghia | Components | Free | 1 dep |
